Skip to main content
Glama

Check spec/code drift

check_drift

Compare TypeScript source against YAML spec to detect missing fields, extra fields, and type mismatches. Run to prevent silent drift before commits.

Instructions

Compare the spec against the actual TypeScript source and report every drift: fields missing in code, extra fields absent from the spec, and type mismatches. Run this before committing, or right after editing a spec-controlled type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootNoproject root the spec 'source' paths are relative to
entityNolimit the check to one entity
specDirNo
Behavior2/5

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

No annotations are provided, so the description must disclose all behavioral traits. It describes a read-only comparison but doesn't explicitly state non-destructiveness, permissions, or side effects. Insufficient for a tool with no annotation support.

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 with no wasted words. First sentence defines action and scope, second gives usage timing. Efficient 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 covers basic purpose and usage timing but omits return format, error conditions, and behavioral details (e.g., what happens when no drift is found). For a tool with no output schema and no annotations, more completeness is needed.

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

Parameters2/5

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

Schema description coverage is 67% (2 of 3 parameters have descriptions). The description adds no extra meaning beyond the schema; it doesn't document the undocumented specDir parameter. No value added over schema.

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 states the tool compares spec against TypeScript source and reports drift, listing specific types of mismatches. This distinguishes it from sibling tools like explain_spec and list_specs.

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?

Explicitly says to run before committing or after editing a spec-controlled type, providing clear usage context. No mention of when not to use, but siblings are unrelated, so no need for alternatives.

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/3ii-factory/spec-drift-mcp'

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