Datatape
CLI

CLI usage

Use the Datatape CLI to list agents, call tools, and configure MCP connections.

CLI usage

The dt CLI provides commands for managing your Datatape resources and calling tools directly from the terminal.

Commands overview

CommandDescription
dt agentsList all agents in your organization
dt toolsList all tools across agents
dt tools show <tool>Show details for a specific tool
dt call <tool>Execute a tool
dt connect <agent>Get MCP connection details for an agent
dt whoamiShow current user and organization
dt loginAuthenticate with Datatape
dt logoutClear stored credentials

List agents

dt agents
ID          Name            Tools  Created
a1b2c3d4    Customer Data   3      2026-02-10
e5f6g7h8    Analytics       7      2026-03-01

List and inspect tools

List all tools:

dt tools
Agent           Tool                  Source
Customer Data   get_customers         production-pg
Customer Data   revenue_by_region     production-pg
Analytics       daily_active_users    analytics-pg

Show details for a specific tool, including parameters and the SQL template:

dt tools show get_customers
Name:        get_customers
Agent:       Customer Data
Source:       production-pg
Description: Fetch customers filtered by region and minimum spend

Parameters:
  region    string   required    Customer region (e.g., "us-east")
  min_spend number   optional    Minimum total spend (default: 0)

SQL Template:
  SELECT customer_name, email, total_spent
  FROM customers
  WHERE region = {{ region }}
    AND total_spent >= {{ min_spend }}
  ORDER BY total_spent DESC

Call a tool

Execute a tool with parameters:

dt call get_customers --param region=us-east --param min_spend=1000
[
  {"customer_name": "Acme Corp", "email": "buyer@acme.com", "total_spent": 52400},
  {"customer_name": "Globex Inc", "email": "data@globex.com", "total_spent": 31200}
]

Output options

Return raw JSON (useful for piping to jq):

dt call get_customers --param region=us-east --json | jq '.[0]'

Preview the rendered SQL without executing it:

dt call get_customers --param region=us-east --dry-run
SELECT customer_name, email, total_spent
FROM customers
WHERE region = 'us-east'
  AND total_spent >= 0
ORDER BY total_spent DESC

terminal showing dt call output with

Connect an AI client

Get the MCP URL and setup instructions for an agent:

dt connect customer-data
MCP Endpoint: https://your-org-id.mcp.datatape.ai/mcp

Claude Desktop — add to claude_desktop_config.json:
{
  "mcpServers": {
    "customer-data": {
      "url": "https://your-org-id.mcp.datatape.ai/mcp",
      "headers": {
        "Authorization": "Bearer dt_live_your_agent_api_key_here"
      }
    }
  }
}

Claude Code:
  claude mcp add customer-data https://your-org-id.mcp.datatape.ai/mcp \
    --header "Authorization: Bearer dt_live_your_agent_api_key_here"

Cursor:
  Settings > MCP Servers > Add Server > paste the endpoint URL

terminal showing dt connect output with

Session management

Check your current session:

dt whoami

Log out and clear stored credentials:

dt logout

dt logout removes locally stored tokens. It does not revoke agent API keys — manage those from the dashboard or via the API.

On this page