Tools
Built. Tools are what an agent can do. They are set on the agent.
The built-in toolset
tools: [{ type: "agent_toolset_20260401" }]
| Tool | What it does | Where it runs |
|---|---|---|
bash |
Shell commands | The session's sandbox |
read, write, edit |
File operations | The sandbox |
glob, grep |
Find files and text | The sandbox |
web_fetch |
Fetch a URL | From the region, through the host rules |
web_search |
Search the web | From the region: Brave Search if BRAVE_API_KEY is set, otherwise DuckDuckGo's HTML endpoint |
Turn a tool off or set its policy with configs:
tools: [{
type: "agent_toolset_20260401",
configs: [
{ name: "web_search", enabled: false },
{ name: "bash", permission_policy: { type: "always_ask" } },
],
}]
Permission policies
| Policy | Behaviour |
|---|---|
always_allow |
The call runs |
always_ask |
The session goes idle with stop_reason.type = "requires_action" until you answer |
auto |
MAA applies a simple rule set to each call: allow by default, deny clearly destructive shell commands, and ask for MCP tools, remote scripts and privilege escalation |
Answer a waiting call with a confirmation. tool_use_id is the id of the event that asked:
await client.beta.sessions.events.send(session.id, {
events: [{ type: "user.tool_confirmation", tool_use_id: event.id, result: "allow" }],
});
// or: { type: "user.tool_confirmation", tool_use_id: event.id, result: "deny", deny_message: "Read the example file instead" }
auto is not a human checkpoint and in v1 it is a short list of rules, not a model-based review. If a person must see a call before it runs, use always_ask.
Custom tools
A custom tool is one you run yourself. Define it with a name, a description and a JSON Schema:
tools: [{
type: "custom",
name: "lookup_order",
description: "Look up an order by its number in our order system.",
input_schema: { type: "object", properties: { order_id: { type: "string" } }, required: ["order_id"] },
}]
When the agent calls it you receive agent.custom_tool_use and the session waits. Run the tool and reply with user.custom_tool_result. Secrets used by a custom tool never enter the sandbox, because the tool runs on your side.
MCP servers
Declare remote MCP servers (streamable HTTP) on the agent and enable their tools with an mcp_toolset:
mcp_servers: [{ type: "url", name: "tracker", url: "https://mcp.example.com/mcp" }],
tools: [{ type: "mcp_toolset", mcp_server_name: "tracker" }],
The agent definition holds no credentials. Put them in a vault (static_bearer or mcp_oauth) and attach the vault to the session.
Not in v1
- Hosted skills. Ship skills as files in the sandbox or in a memory store instead.