Tool Interception profile
Status: Working Draft — draft. This is a language-neutral description for the tool.before and deny behavior defined by the canonical specification.
Harness observations
Given a valid tool.before intercept subscription that exactly matches a pending tool call’s event name and delivery mode:
- The harness sends one
hooks/interceptrequest after tool name and input are final and before tool side effects. - The JSON-RPC request ID equals the event ID. Retries preserve event, session, call, and request identities and event content.
- The request contains
capabilities.effects, includingdenyto declare that the harness accepts and enforces a valid denial for the event. - Matching interceptors execute serially in deterministic registration order under their original deadline.
- A valid empty effect list continues normal host authorization without granting permission.
- One valid advertised
denystops evaluation and tool execution. - Malformed output, unavailable backends, unsupported semantics, and timeouts apply the configured
fail-openorfail-closedpolicy.
Without a matching tool.before intercept subscription, the harness sends no AHP decision request and continues its normal authorization flow.
Backend observations
Given a syntactically valid hooks/intercept request for protocol draft and tool.before, the backend returns exactly one successful response containing either:
effects: []; or- one advertised
denyeffect with a non-empty reason.
The backend does not return an unadvertised effect or multiple effects.