Skip to main content
Glama

Diff a spec-loop projection

diff
Read-onlyIdempotent

Compare a regenerated spec-loop feature projection against on-disk files and the manifest. Each hunk is reported with its block id, JSON pointer, and classified alteration.

Instructions

Compare the regenerated projection of a spec-loop feature with the files on disk and the manifest; each hunk carries its block id and JSON pointer, and every alteration is classified.

Input Schema

NameRequiredDescriptionDefault
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.
featureYesspec-loop feature: its id (FEAT-001), its name (maket-http-connector) or its folder

Output Schema

NameRequiredDescriptionDefault
cleanYes
filesYes
featureYes
ownerEditsYes
alterationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the description is not responsible for covering the safety profile. It adds genuinely new behavior: the comparison is three-way (regenerated projection, disk files, manifest), and every alteration comes classified with a block id and JSON pointer, which tells the agent what kind of answer to expect.

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?

It is a single front-loaded sentence that establishes the comparison target first and the result shape second, with no filler or restatement of the name.

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 and rich annotations, the description covers the comparison semantics and the meaning of the returned hunks, which is what an agent needs in order to call it. The only gap is routing guidance against reconcile and validate, which is a usage-guidelines concern.

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%, and the schema already spells out the fallback chain for root (SPEC_LOOP_ROOT, CLAUDE_PROJECT_DIR, working directory) and the three accepted feature forms. The description adds nothing parameter-level beyond that, so the baseline 3 applies.

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 gives a specific verb and resource: it compares a regenerated projection against both the on-disk files and the manifest, and it names what the result contains (hunks with block ids and JSON pointers). It does not, however, distinguish this from adjacent siblings like reconcile or validate, which an agent could easily confuse with it.

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 word 'Compare' plus the mention of the regenerated projection implies the situation where this is useful (checking drift after regeneration), but there is no explicit when-to-use or when-not-to-use statement, and no sibling is named as the alternative. Guidance is inferable but not stated.

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