Skip to main content
Glama

validate_graph

Detect unreachable nodes, missing END paths, dangling conditions/edges, and duplicate IDs in a LangGraph YAML spec. Returns ok=False for any errors.

Instructions

Check the spec for unreachable nodes, missing paths to END, dangling conditions/edges, and duplicate/typo'd ids. Returns ok=False if any errors (as opposed to warnings) are found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description must carry the burden of behavioral disclosure. It explains that the tool returns ok=False if errors are found, and distinguishes errors from warnings, which is useful. However, it doesn't specify what 'errors' vs 'warnings' mean in this context, nor does it explain whether the tool performs any side effects (likely none, but it's not stated). Since it's a validation tool, it's presumably read-only, but that's implicit, not explicit.

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?

The description is two sentences, with the first sentence defining the purpose and the second detailing the return behavior. It's concise, front-loaded with the action and scope, and every phrase adds value. No redundant information.

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

Completeness4/5

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

The tool is a validation function with a single simple parameter and an output schema (which likely describes the return structure). Given its complexity, the description covers the core functionality (what is validated, what the result means). It doesn't provide examples or elaborate on warning vs error categories, but for a validation tool, this is reasonably complete. The output schema exists, so return details are structured elsewhere.

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

Parameters4/5

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

The schema has 0% description coverage for the only parameter 'project_dir', so the description must compensate. The description does not explain 'project_dir' beyond its name, but the name is self-explanatory (the directory containing the spec). Given the parameter's simplicity, the missing explicit description is a minor gap. Still, the description doesn't add any additional meaning beyond the schema, but the schema itself is minimal, so the baseline is 4 due to low coverage.

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

Purpose4/5

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

The description clearly states a specific verb ('validate') and resource ('the spec'), and lists the specific error types it checks for (unreachable nodes, missing paths to END, dangling conditions/edges, duplicate/typo'd ids). This distinguishes it from sibling tools like get_spec or init_project, though it doesn't explicitly name a sibling.

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

Usage Guidelines3/5

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

The description implies when to use it (when you need to validate the spec for errors), but it doesn't explicitly state when to use it versus alternatives or when not to use it. It also doesn't mention typical triggers like 'after making changes' or 'before rendering'. The context is clear enough but lacks explicit routing guidance.

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