tools field on
POST /v1/agents and
POST /v1/agents/{agentId}.
Tool config types
Thetools array accepts three config types:
Built-in agent toolsets
Managed agents expose these built-in toolsets. Configure them by toolset name inconfigs; a toolset with enabled: false is invisible to the model.
Built-in toolset config
MCP toolset config
MCP tools are attached by pairing anmcpServers entry with an mcp_toolset
entry in tools.
Custom tool config
Custom tools are functions your application executes outside the managed agent environment. Declare them withtype: "custom_tool", a model-facing name, a clear
description, and an input_schema.
Custom tools use the permission policy above. With the default
always_ask, the
stream emits an approval request first. After approval, the stream emits
agent.custom_tool_use and then session.status_idle with
stop_reason.type: "requires_action". Execute the tool in your application and
return user.custom_tool_result to
POST /v1/sessions/{sessionId}/events.
See the Events Reference
for the full request/response flow.
If the application-owned work cannot finish promptly, use the dedicated
long-running custom tools flow. The initial
response must reach the pending tool call within approximately five minutes.
Permission policies
Permission policies control whether built-in, MCP, and custom tools run automatically or wait for approval.
When a tool with
always_ask is invoked, the session emits
agent.approval_request, then pauses with session.status_idle and
stop_reason.type: "requires_action". Continue by sending
user.approval_response to POST /v1/sessions/{sessionId}/events.
For trusted autonomous sessions, set yoloMode: true on the session to automatically accept always_ask approval prompts. YOLO mode does not bypass always_deny or disabled tools.
When a tool is disabled with enabled: false, Herm treats it as
always_deny: the request is denied before execution and no approval request is
emitted.
Role-specific tool policies
Agent versions can also define named roles. A role contains its owntools
array using the same config shapes shown above. When a session is created with a
role, that role’s tool policy is used for approval decisions instead of the
agent version’s top-level tools.
role to
POST /v1/sessions.
Update semantics
Agent updates create a new immutable version. WithPATCH /v1/agents/{agentId}, supplied tools are upserted by their stable key and
omitted tools are preserved; an empty array removes nothing. Use the
full-replacement POST /v1/agents/{agentId} to replace the complete tools
array or clear it with tools: [].
