Skip to main content
Glama

verify_contract

Checks a component against its manifest slice before save, catching contract violations locally so builds fail less after merge. Returns pass/fail details without mutating geometry.

Instructions

Build-time self-check of a component against its manifest slice (RFC §11.3): a builder calls this on its OWN part before save, so a contract violation is caught locally and cheaply instead of after a fan-in merge (build → merge → gate-fail → rebuild becomes build → self-check → fix). Never raises on a failing check (a failure is a passed=False row), so it is safe to call in a loop. Inspection only; mutates nothing.

handle: the component's shaped object. contract: the component's slice — all keys optional, give at least one: envelope {min:[x,y,z], max:[x,y,z]} the part's LOCAL bbox must fit in it. interfaces {name: {origin:[x,y,z], z_axis?:[x,y,z], tol_mm?, angle_tol_deg?}} each named frame must be PUBLISHED (publish_interface) and within tolerance of the contracted origin (and axis, if z_axis given) — catches "forgot to publish" / "published in the wrong place". features [ {kind, ...} ] per-feature self-checks: {kind:"gear", module_mm, teeth, internal?, tol_mm?} {kind:"bore", diameter_mm, tol_mm?} {kind:"extent", axis:"x"|"y"|"z", length_mm, tol_mm?} intent bool also run verify_intent.

Returns {handle, ok, results:[{check, passed, detail}]} — ok True iff every check passed; check names are envelope / interface: / feature: / intent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYes
contractYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description must carry the burden — and it does. It discloses that it never raises on failure (a failure is a passed=False row), that it is inspection-only and mutates nothing, and how each check category behaves (published-frame tolerance, forgot-to-publish detection). This is exactly the extra behavioral context an agent needs.

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?

Front-loaded with the core purpose and workflow rationale, then a well-organized structured breakdown of the contract keys. Dense but every section earns its place given the nested contract object. Slightly long, but justified by the complexity.

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

Completeness5/5

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

Given a 2-param tool with a deep nested contract object, no annotations, no output schema, and 0% schema coverage, the description is complete: it defines every check category, the optional contract keys, the return shape ({handle, ok, results:[...]}), and the check-name format. An agent can call this correctly without any other source.

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

Parameters5/5

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

Schema description coverage is 0%, so the description compensates fully: it explains handle (the shaped object) and contract (the slice, all keys optional, at least one), and documents each sub-key with types and meanings — envelope bbox fitting, interfaces frames with origin/z_axis/tolerances and the publish requirement, feature self-check kinds (gear/bore/extent) with their fields, and the intent flag. This is richer than the schema itself.

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+resource (self-check of a component against its manifest slice) and disambiguates from the very similar sibling component_contract_check by anchoring it as a build-time, LOCAL pre-save check versus post-fan-in verification. The described workflow (build → self-check → fix vs build → merge → gate-fail → rebuild) makes the distinction concrete.

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

Usage Guidelines5/5

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

Explicitly says a builder calls this on its OWN part BEFORE save, and states it is safe to call in a loop. Alternatives are implied by the component_contract_check sibling and the fan-in merge flow. When-to-use is unambiguous.

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

Deploy Server

Other Tools