Skip to main content
Glama

validate_routing_guard

Validates whether a direct Edit or Write tool call is permitted for the current routing context in Claude Code.

Instructions

Validate whether a direct Edit or Write tool call is allowed for the current routed task context. Intended for Claude Code PreToolUse hooks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory reported by the host hook
skillNoOptional skill name (e.g. 'auto-time') — matched against routing exceptions
tool_nameNoHost tool name, for example Edit or Write
target_fileNoAbsolute path of the file about to be edited or written
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It does not mention side effects, permissions, return behavior, or whether the tool mutates state. The agent cannot infer safety or required conditions beyond the stated validation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences efficiently convey purpose and usage context with no redundant information. The description is front-loaded and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains purpose and context but lacks any mention of return values or output. Given there is no output schema, this is a notable gap. For a validation tool, the agent would benefit from knowing the response format (e.g., boolean or error).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description does not need to add parameter details. It does not provide any additional meaning beyond the schema, resulting in a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the verb 'validate' and the resource 'routing guard for Edit/Write calls'. It also indicates the context (PreToolUse hooks), differentiating it from sibling tools like route_task or execute_subtask.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states it is intended for PreToolUse hooks, giving clear context for when to use. However, it does not explicitly mention when not to use or provide alternatives, which would strengthen guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/timjensgrossinger/threnody'

If you have feedback or need assistance with the MCP directory API, please join our Discord server