Tools
Tools are the capabilities agents can use. Three kinds:
- Built-in tools: capabilities the platform provides directly (memory, task history, task setup, feedback). Never passed in
tools; the configurable ones are toggled withenable_*fields. See Built-in tools. - 3rd-party integrations: external services like Gmail, Slack, and Google Ads, connected via OAuth.
- Desktop tools: when sandbox execution is enabled, every run also gets
computer,bash, and a file editor over a full Linux desktop, automatically. See Computer use.
The tools array below is only for 3rd-party integrations and custom tools. Passing a built-in name (e.g. "memory") returns a 422.
List available integrations
from m8tes import M8tes
client = M8tes()
page = client.apps.list()
for app in page.data:
status = "connected" if app.connected else "not connected"
print(f"{app.name} ({app.category}): {status}")Assign tools to an agent
Set the base tool set when creating an agent. These tools are available on every run:
bot = client.agents.create(
name="marketing bot",
tools=["slack", "googlesheets", "gmail"],
instructions="Manage marketing campaigns and report on metrics"
)Override per task or per run
Tasks and runs can override the agent's tool set:
task = client.tasks.create(
agent_id=bot.id,
instructions="Send the weekly newsletter via Slack",
tools=["slack"], # only Slack for this task
)
run = client.runs.create(
agent_id=bot.id,
message="Send the weekly newsletter",
tools=["slack"], # only Slack for this run
stream=False,
)The most specific level wins: run over task over agent. If a run omits tools, the task's tools apply, then the agent's.
This cascade covers catalog tools. Custom tools attach to an agent only. A task- or run-level tools list containing a custom slug is rejected. For one agent per end-user acting on your own API, see Your API as MCP tools.
Account-level connections are made through the Developer Dashboard; OAuth flows are handled automatically, and client.apps.list() (above) shows what's connected.
End-user connections (multi-tenant OAuth)
Connect apps programmatically for your end-users. Each customer authorizes their own Gmail, Slack, etc.
1. Initiate connection
conn = client.apps.connect_oauth(
"gmail",
redirect_uri="https://yourapp.com/callback",
user_id="cust_123",
)
print(conn.authorization_url) # redirect your user here; keep conn.connection_id2. Complete connection
After the user completes OAuth and is redirected back:
result = client.apps.connect_complete("gmail", connection_id=conn.connection_id, user_id="cust_123")
print(result.status) # "connected"3. Check status and disconnect
connections = client.apps.connections.list("gmail", user_id="cust_123")
for connection in connections.data:
print(connection.status, connection.account_label, connection.scopes)
client.apps.disconnect("gmail", user_id="cust_123")Isolation
- Each end-user gets their own OAuth connection, scoped by
user_id - Runs for that user automatically use their connected accounts
- There is no fallback from
user_id-scoped runs to account-level connections
Next: Built-in tools · Computer use · Human-in-the-loop · Users