Skip to content

The Agent: Tools endpoints expose the agent’s tool catalogue, the effective tool set of a live session (including its MCP subset), and a single gated choke point for executing tools. Every execution path — sessionless sync, sessionless async, sessionless SSE, or inside a live session — funnels through the same gate chain (deny list, static-stakes, read-before-edit, dir-scope, write-permission, tool-membership). Use these endpoints to introspect what tools are available, then run them with an explicit confirmation posture when the gate requires it.


Lists the agent’s built-in tool schemas (name, description, JSON-Schema input, read_only flag). Catalogue-wide and realm-independent: a per-request realm header is rejected. Pass ?page=N&limit=M for a window; omit limit for the full set.

NameInTypeRequiredDescription
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1). Required by routes that resolve a cwd.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): "global" or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoQuery alias of X-Hoody-Realm (read only when the header is absent).
Terminal window
curl -sS -X GET \
-H "X-Hoody-Cwd: /home/dev/projects/app" \
"https://gateway.hoody.ai/api/v1/agent/tools?page=1&limit=50"

Returns the schema for a single built-in tool by name. Returns 404 tool_not_found for an unknown name. Catalogue-wide and realm-independent: a per-request realm header is rejected.

NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1). Rejected (400 realm_scope_unsupported).
realmquerystringNoQuery alias of X-Hoody-Realm.
Terminal window
curl -sS -X GET \
"https://gateway.hoody.ai/api/v1/agent/tools/read_file"

Lists the read-only tools (safe for planning / sessionless runs). Catalogue-wide and realm-independent: a per-request realm header is rejected. Pagination honored.

NameInTypeRequiredDescription
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1). Rejected (400 realm_scope_unsupported).
realmquerystringNoQuery alias of X-Hoody-Realm.
Terminal window
curl -sS -X GET \
"https://gateway.hoody.ai/api/v1/agent/tools/read-only?page=1&limit=50"

Returns the complete effective tool set for a live session (computeTools = config-enabled AND on PATH, gated by the session’s tool mode / agent allowlist / headless exclusions). Returns 404 not_found when the session is not live.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1). Rejected (400 realm_scope_unsupported).
realmquerystringNoQuery alias of X-Hoody-Realm.
Terminal window
curl -sS -X GET \
"https://gateway.hoody.ai/api/v1/agent/sessions/sess_8f2a1c7e9b0d4f3a/tools?page=1&limit=50"

Returns the MCP (mcp__*) tools available in a live session (drawn from the same computeTools snapshot). Returns 404 not_found when the session is not live.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1). Rejected (400 realm_scope_unsupported).
realmquerystringNoQuery alias of X-Hoody-Realm.
Terminal window
curl -sS -X GET \
"https://gateway.hoody.ai/api/v1/agent/sessions/sess_8f2a1c7e9b0d4f3a/tools/mcp?page=1&limit=50"

These three routes share the same gate chain. They mint an ephemeral local session from the scope headers (X-Hoody-Cwd / X-Hoody-Config-Dir / X-Hoody-Tool-Mode / X-Hoody-Dir-Scope) and run executeToolDirect with the full gate chain (deny list / static-stakes / read-before-edit / dir-scope / write-permission / tool-membership). Sessionless runs are read-only by default — a non-read-only tool requires allow_mutations:true or confirm:true.

Runs a tool through the single gated choke point with no open session and returns the result inline. A parked confirmation returns 409 tool_needs_confirmation with the echoed tool + params; re-issue with confirm:true (and the confirm_token).

NameInTypeRequiredDescription
namepathstringYesPath identifier.
confirmquerybooleanNoQuery alias of the body confirm field — re-issue a previously-parked confirmation (pair with confirm_token).
confirm_tokenquerystringNoQuery alias of the body confirm_token field — the single-use token returned in the 409 tool_needs_confirmation details.
X-Hoody-Tool-ModeheaderstringNoSessionless tool-mode for the ephemeral session (e.g. read_only / full); default per the daemon. Ignored on the in-session run.
X-Hoody-Dir-ScopeheaderstringNoSessionless directory-access scope for the ephemeral session (e.g. home / full); default home. Ignored on the in-session run.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1). Rejected (400 realm_scope_unsupported).
realmquerystringNoQuery alias of X-Hoody-Realm.
FieldTypeRequiredDescription
paramsobjectNoThe tool’s input parameters (its JSON-Schema body).
confirmbooleanNoRe-issue a previously-parked confirmation. MUST be paired with confirm_token; a bare confirm:true with no valid token does NOT bypass the gate.
confirm_tokenstringNoThe single-use token returned in the 409 tool_needs_confirmation details. Bound to the tool / session / params it was minted for.
allow_mutationsbooleanNoSessionless only: opt a non-read-only tool into running under the full gate chain (else a sessionless mutating run is refused 400 tool_mutation_refused).
Terminal window
curl -sS -X POST \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/dev/projects/app" \
-d '{
"params": { "path": "/home/dev/projects/app/src/index.ts" }
}' \
"https://gateway.hoody.ai/api/v1/agent/tools/read_file/run"

Async form of runTool: returns {job_id} immediately and runs the gated tool in the background. Poll GET /jobs/{id}/result for the result (or a parked confirmation). A non-read-only sessionless run still requires an explicit posture.

NameInTypeRequiredDescription
namepathstringYesPath identifier.
confirmquerybooleanNoQuery alias of the body confirm field — re-issue a previously-parked confirmation (pair with confirm_token).
confirm_tokenquerystringNoQuery alias of the body confirm_token field — the single-use token returned in the 409 tool_needs_confirmation details.
X-Hoody-Tool-ModeheaderstringNoSessionless tool-mode for the ephemeral session (e.g. read_only / full); default per the daemon. Ignored on the in-session run.
X-Hoody-Dir-ScopeheaderstringNoSessionless directory-access scope for the ephemeral session (e.g. home / full); default home. Ignored on the in-session run.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1). Rejected (400 realm_scope_unsupported).
realmquerystringNoQuery alias of X-Hoody-Realm.
FieldTypeRequiredDescription
paramsobjectNoThe tool’s input parameters (its JSON-Schema body).
confirmbooleanNoRe-issue a previously-parked confirmation. MUST be paired with confirm_token.
confirm_tokenstringNoThe single-use token returned in the 409 tool_needs_confirmation details.
allow_mutationsbooleanNoSessionless only: opt a non-read-only tool into running under the full gate chain.
Terminal window
curl -sS -X POST \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/dev/projects/app" \
-d '{
"params": { "path": "/home/dev/projects/app/src/index.ts" }
}' \
"https://gateway.hoody.ai/api/v1/agent/tools/read_file/runAsync"

Streaming form of runTool over Server-Sent Events: a start frame, then a result / needs_confirmation / error frame, then end. The work is a one-shot gated RPC, so there is no per-token stream — the SSE shape mirrors the kit streaming convention for symmetry with the session stream. A non-read-only sessionless run still requires an explicit posture.

NameInTypeRequiredDescription
namepathstringYesPath identifier.
confirmquerybooleanNoQuery alias of the body confirm field — re-issue a previously-parked confirmation (pair with confirm_token).
confirm_tokenquerystringNoQuery alias of the body confirm_token field — the single-use token returned in the 409 tool_needs_confirmation details.
X-Hoody-Tool-ModeheaderstringNoSessionless tool-mode for the ephemeral session (e.g. read_only / full); default per the daemon. Ignored on the in-session run.
X-Hoody-Dir-ScopeheaderstringNoSessionless directory-access scope for the ephemeral session (e.g. home / full); default home. Ignored on the in-session run.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1). Rejected (400 realm_scope_unsupported).
realmquerystringNoQuery alias of X-Hoody-Realm.
FieldTypeRequiredDescription
paramsobjectNoThe tool’s input parameters (its JSON-Schema body).
confirmbooleanNoRe-issue a previously-parked confirmation. MUST be paired with confirm_token.
confirm_tokenstringNoThe single-use token returned in the 409 tool_needs_confirmation details.
allow_mutationsbooleanNoSessionless only: opt a non-read-only tool into running under the full gate chain.
Terminal window
curl -sS -N -X POST \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/dev/projects/app" \
-d '{
"params": { "path": "/home/dev/projects/app/README.md" }
}' \
"https://gateway.hoody.ai/api/v1/agent/tools/read_file/stream"

POST /api/v1/agent/sessions/{id}/tools/{name}/run

Section titled “POST /api/v1/agent/sessions/{id}/tools/{name}/run”

Runs a tool through the gated choke point on a live session. The gateway scrubs caller-supplied control keys and routes the run through executeToolDirect against the session’s frozen realm / container / cwd / tool-mode / dir-scope, with the full gate chain. It claims the session’s single serial turn slot so a direct tool run never races the turn loop (409 turn_in_flight if a turn is running; 409 gate_parked if a gate is parked). Because it occupies the turn slot it is also cancellable the same way a turn is: a concurrent POST /sessions/{id}/cancel (or a WS cancel frame, or session close) aborts the in-flight run. A parked confirmation returns 409 tool_needs_confirmation with the echoed tool + params; re-issue with confirm:true (and the confirm_token). Returns 404 tool_not_found when the tool is not in the session’s effective tool list.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
namepathstringYesPath identifier.
confirmquerybooleanNoQuery alias of the body confirm field — re-issue a previously-parked confirmation (pair with confirm_token).
confirm_tokenquerystringNoQuery alias of the body confirm_token field — the single-use token returned in the 409 tool_needs_confirmation details.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1). Rejected (400 realm_scope_unsupported).
realmquerystringNoQuery alias of X-Hoody-Realm.
FieldTypeRequiredDescription
paramsobjectNoThe tool’s input parameters (its JSON-Schema body).
confirmbooleanNoRe-issue a previously-parked confirmation. MUST be paired with confirm_token; a bare confirm:true with no valid token does NOT bypass the gate.
confirm_tokenstringNoThe single-use token returned in the 409 tool_needs_confirmation details. Bound to the tool / session / params it was minted for.
allow_mutationsbooleanNoSessionless only — ignored on the in-session run (it inherits the session’s frozen posture).
Terminal window
curl -sS -X POST \
-H "Content-Type: application/json" \
-d '{
"params": { "path": "/home/dev/projects/app/src/index.ts" }
}' \
"https://gateway.hoody.ai/api/v1/agent/sessions/sess_8f2a1c7e9b0d4f3a/tools/read_file/run"