Skip to main content
Glama

Validate a spec-loop feature

validate
Read-onlyIdempotent

Checks a feature specification or candidate object against its phase schema, coverage rules, Mermaid artifacts, and stored SVG safety/existence checks, reporting every error with a JSON pointer.

Instructions

Validate a spec-loop feature.json, or a candidate object, against the schema and the coverage checks of its phase, and parse every Mermaid artifact; for a stored feature, also check that every svg artifact file exists and is a safe svg. Every error has a JSON pointer.

Input Schema

NameRequiredDescriptionDefault
jsonNoCandidate feature object, validated instead of the stored file
rootNoAbsolute path of the project holding spec/. Pass it on every call; otherwise SPEC_LOOP_ROOT, then CLAUDE_PROJECT_DIR, then the server working directory.
featureNospec-loop feature: its id (FEAT-001), its name (maket-http-connector) or its folder

Output Schema

NameRequiredDescriptionDefault
phaseYes
validYesNo invalid error: the JSON may be written
errorsYes
completeYesNo error at all: the current phase is complete

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and non-destructive, so safety is covered; the description adds genuinely new behavior: Mermaid artifacts are parsed, svg artifacts are existence- and safety-checked only for stored features, and errors carry JSON pointers. It does not describe error verbosity or failure aggregation, leaving a small gap.

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

Conciseness4/5

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

A single dense sentence that front-loads the object of validation before the extra checks. It is efficient, though the run-on structure makes the checks slightly harder to scan than a short bulleted breakdown would.

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?

With an output schema present, return values need not be explained, and the description covers both input modes and the error-pointer convention. Minor gaps remain around precedence between json and feature and whether multiple errors are returned together.

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 description coverage is 100%, so the schema already explains json, root and feature fully, including root resolution precedence. The description only implicitly conveys that json takes precedence over the stored file, adding little beyond the schema's own text; baseline 3 applies.

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?

States a specific verb (validate) and precise resources (feature.json or a candidate object) plus the exact check set: schema, phase coverage checks, Mermaid parsing, and svg file existence/safety. No sibling (diff, render, phase, reconcile) shares this verb-and-check profile, so the tool is easy to distinguish.

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?

Clearly delineates two usage modes: a stored feature versus a candidate object passed inline, and notes that the stored-file path adds svg artifact checks. It does not name alternatives or when-not conditions (e.g., reconcile vs validate), so it stops short of full routing guidance.

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