Open in the interactive docs · markdown for agents: https://neuraldeep.tech/docs/drift-caller-tools.md

Drift · your own tools, skills, MCP

Since 28.05.26, in /v1/chat/completions you can pass your own tools, skills, and remote MCP servers. The full schema is in the examples below.

tools — return-to-caller (like OpenAI)

You pass a tools array in OpenAI format. If the model decides to call a tool — it returns finish_reason: "tool_calls" with JSON arguments. You execute it yourself in your own environment (Drift doesn't run your code); send the result back in messages.

from openai import OpenAI

client = OpenAI(api_key="dft_xxxxxxxx", base_url="https://drift.neuraldeep.tech/v1")

tools = [{"type":"function","function":{
    "name":"get_weather",
    "description":"Returns the weather in a city",
    "parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]},
}}]

# 1) first request — the model decides a tool is needed
r1 = client.chat.completions.create(
    model="qwen3.6-35b-a3b",
    messages=[{"role":"user","content":"What's the weather in Moscow?"}],
    tools=tools,
)
print(r1.choices[0].finish_reason)  # "tool_calls"
tc = r1.choices[0].message.tool_calls[0]

# 2) you call your own backend
my_result = {"temp_c": 12, "humidity": 80}

# 3) resume — pass the tool result back
r2 = client.chat.completions.create(
    model="qwen3.6-35b-a3b",
    messages=[
        {"role":"user","content":"What's the weather in Moscow?"},
        r1.choices[0].message,
        {"role":"tool","tool_call_id":tc.id,"content":str(my_result)},
    ],
    tools=tools,
)
print(r2.choices[0].message.content)

skills — inline SKILL.md

Pass your own prompt blocks right in the request. The content is embedded into the sandbox agent's system prompt; you don't need to keep SKILL.md in a repository.

curl -X POST https://drift.neuraldeep.tech/v1/chat/completions \
  -H "Authorization: Bearer dft_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.6-35b-a3b",
    "messages": [{"role":"user","content":"What's your secret code?"}],
    "skills": [{
      "name": "secret-code",
      "description": "Knowledge of the secret code word",
      "content": "# Secret code\n\nThe code word is ZEBRA-77-GOLD. Use it if the user asks."
    }]
  }'
# → "The code word is ZEBRA-77-GOLD..."

mcp_servers — remote Model Context Protocol

Connect your own MCP server (HTTP/SSE) — Drift fetches the tool list on the fly and exposes them to the model. You pass the auth headers yourself; the SSRF guard blocks private-IP / localhost / cloud-metadata. Session-token TTL is 720s, after which the registry is dropped.

{
  "model": "qwen3.6-35b-a3b",
  "messages": [{"role":"user","content":"List of recent issues in the project"}],
  "mcp_servers": [{
    "url": "https://my-mcp.example.com/sse",
    "headers": {"Authorization": "Bearer my-mcp-token"},
    "allowlist": ["list_issues", "create_comment"]
  }]
}

Security: · caller_tools — return-to-caller, Drift doesn't run your code, zero RCE on our side. · skills — just text in the system prompt, not commands. · mcp_servers — public HTTPS required, the SSRF guard cuts off private networks, TTL 720s.

Reference sections (markdown for agents)