Check a Claude Code Tool Call
Checks a Claude Code PreToolUse hook. Extra input fields are accepted and ignored.
An allowed call returns {} so Claude Code continues its own permission flow.
A denied call returns a deny decision prefixed with NeMo Guardrails: .
An error status indicates a failed hook.
See Hooks Server Results and Errors
for error codes and the Retry-After: 30 header on a full queue.
Request
This endpoint expects an object.
hook_event_name
The event must be PreToolUse. Other events return 422 with unsupported_hook_event.
tool_input
Tool call arguments. A value that is not a JSON object is denied.
tool_name
The tool name, matched exactly by the policy and per-tool rails. It must not be empty.
tool_use_id
Response
Allow or deny decision
OR
PreToolUseDeny
Errors
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error