Set agent session-start hook

Set or replace the agent's session-start hook on the Custom MCP integration named by app. The hook tool is invoked server-side at session start and hidden from the model. Returns 404 when the agent is not found / unsupported, or when the agent has no Custom MCP integration with the given app.

put/v1/agents/{id}/session-start-hook

Request

  • Base URL
    https://api.runbear.io
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

Agent ID

Request body

appstring required

Custom MCP integration namespace (app) that hosts the hook tool.

toolNamestring required

Name of the MCP tool invoked server-side once at session start. Hidden from the model's tool list.

timeoutMsinteger

Per-call timeout in milliseconds. On timeout the engine degrades gracefully (responds without injected context). Omit for the engine default.

staticArgsobject

Constant arguments always passed to the hook tool, applied only when the tool's input schema declares a matching property (e.g. an authorization key: { "invocation_key": "…" }). NON-SECRET values only — secrets belong in the integration's httpHeaders.

Response

Default Response

appstring required

Custom MCP integration namespace (app) that hosts the hook tool.

toolNamestring required

Name of the MCP tool invoked server-side once at session start. Hidden from the model's tool list.

timeoutMsinteger

Per-call timeout in milliseconds. On timeout the engine degrades gracefully (responds without injected context). Omit for the engine default.

staticArgsobject

Constant arguments always passed to the hook tool, applied only when the tool's input schema declares a matching property (e.g. an authorization key: { "invocation_key": "…" }). NON-SECRET values only — secrets belong in the integration's httpHeaders.

Changes

No recorded changes to this operation across all 1 revision of this API.