Skip to navigation

Check a Claude Code Tool Call

View as MarkdownOpen in Claude

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.

See Check Claude Code Tool Calls with the Hooks Server.

Request

This endpoint expects an object.
hook_event_name"PreToolUse"Required

The event must be PreToolUse. Other events return 422 with unsupported_hook_event.

tool_inputmap from strings to any or list of any or string or double or boolean or nullRequired
Tool call arguments. A value that is not a JSON object is denied.
tool_namestringRequired>=1 character

The tool name, matched exactly by the policy and per-tool rails. It must not be empty.

tool_use_idstringRequired

Response

Allow or deny decision
map from strings to any
OR
PreToolUseDenyobject

Errors

422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error