Client Overview
Every client works against the same small set of routes: list integrations, resolve tools, invoke a tool. Use them from the Python SDK, the TypeScript SDK, raw HTTP, or skip them and connect an MCP client.
Routes and Credentials
"API key" means x-api-key: df_live_.... "Access token" means Authorization: Bearer <token> from POST /api/v1/auth/login. See Credentials for how to get each.
| Route | Accepts | Purpose |
|---|---|---|
GET /api/v1/integrations | Access token | List your integrations, with verified for each. |
POST /api/v1/integrations | Access token | Connect a provider (provider_key, auth_scheme, credentials). |
POST /api/v1/integrations/{id}/test | Access token | Check the stored credentials. Returns verified. |
POST /api/v1/integrations/{id}/resolve-tools | API key or access token | Discover the integration's tools and input schemas. |
GET /api/v1/integrations/{id}/tools | API key or access token | Read the tools already resolved. |
GET /api/v1/integrations/{id}/tools/schema | API key or access token | Tools as OpenAI, Anthropic or MCP tool schemas. |
POST /api/v1/integrations/{id}/invoke | API key or access token | Run a tool. Counts as one tool call. |
POST /mcp | API key or access token | Use every verified integration from an MCP client. |
GET /api/v1/connected_accounts/ | API key | List connection ids for the key's account. |
GET /api/v1/audit/logs | Access token | Read your organization's audit events. |
GET /api/v1/providers | None | Browse the provider catalog. |
Tool schemas, tool resolution and invoke require a verified integration: one whose credentials Datafuse has seen work. On an unverified integration those routes return 403 with connection_verification_required, and GET .../tools returns tool names and short descriptions only.
Tool schemas for any framework
GET /api/v1/integrations/{id}/tools/schema returns an integration's tools in the shape a model API expects:
curl -sS "https://api.datafuse.xyz/api/v1/integrations/$INTEGRATION_ID/tools/schema?format=openai" \
-H "x-api-key: $DATAFUSE_API_KEY"
format | Shape |
|---|---|
openai (default) | [{"type": "function", "function": {"name", "description", "parameters"}}] |
anthropic | [{"name", "description", "input_schema"}] |
mcp | [{"name", "description", "inputSchema"}] |
!IMPORTANT The
namein these schemas is the tool's display name (for exampleList_Models).invoketakes the tool's slug (for exampledeepseek_list_models). Passing the display name to invoke returns404.
To let a model choose a tool and then run its choice, build the schemas from the resolved tools so the name the model sees is the slug:
import os
import requests
base_url = os.getenv("DATAFUSE_API_URL", "https://api.datafuse.xyz")
headers = {"x-api-key": os.environ["DATAFUSE_API_KEY"]}
integration_id = os.environ["INTEGRATION_ID"]
response = requests.get(f"{base_url}/api/v1/integrations/{integration_id}/tools", headers=headers)
response.raise_for_status()
openai_tools = [
{
"type": "function",
"function": {
"name": tool["slug"],
"description": tool["description"] or "",
"parameters": tool["input_schema"] or {"type": "object", "properties": {}},
},
}
for tool in response.json()
]
print([tool["function"]["name"] for tool in openai_tools])
Pass openai_tools to the model. When it returns a tool call, send the call's name as tool_key and its arguments as arguments to POST /api/v1/integrations/{id}/invoke.
MCP clients do not need any of this: the MCP endpoint lists and runs tools under one consistent name.
Next Steps
- Use the typed clients: Python or TypeScript.
- Run the flow by hand with the curl quickstart.