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
| Command | Description |
|---|---|
dt agents | List all agents in your organization |
dt tools | List 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 whoami | Show current user and organization |
dt login | Authenticate with Datatape |
dt logout | Clear stored credentials |
List agents
dt agentsID Name Tools Created
a1b2c3d4 Customer Data 3 2026-02-10
e5f6g7h8 Analytics 7 2026-03-01List and inspect tools
List all tools:
dt toolsAgent Tool Source
Customer Data get_customers production-pg
Customer Data revenue_by_region production-pg
Analytics daily_active_users analytics-pgShow details for a specific tool, including parameters and the SQL template:
dt tools show get_customersName: 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 DESCCall 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-runSELECT customer_name, email, total_spent
FROM customers
WHERE region = 'us-east'
AND total_spent >= 0
ORDER BY total_spent DESC
Connect an AI client
Get the MCP URL and setup instructions for an agent:
dt connect customer-dataMCP 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
Session management
Check your current session:
dt whoamiLog out and clear stored credentials:
dt logoutdt logout removes locally stored tokens. It does not revoke agent API keys — manage those from the dashboard or via the API.