Skip to main content
Glama

Verify Contract

verify_contract
Read-only

Checks a component against its manifest contract before save, catching envelope, interface, feature, and intent violations locally so build-time errors are fixed before merge.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "handle": "<handle>",
      "contract": "<contract>"
    },
    "name": "verify_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
handleYes
contractYes
workspaceNoRun this call in this named workspace

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint by disclosing error semantics ('never raises on a failing check — a failure is a passed=False row'), loop safety, and the exact return shape with check-name naming. It also pre-empts a common confusion by explaining what each interface/feature check actually catches ('forgot to publish' / 'published in the wrong place').

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?

Front-loads purpose, then the handle/contract semantics in indented blocks, then the return contract — dense but every line carries information, including the parenthetical rationale for the pre-save workflow. No filler sentences.

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?

For a 3-parameter inspection tool with no output schema, the description supplies both the full input grammar and the exact return shape ({handle, ok, results:[{check, passed, detail}]}) plus check naming. Nothing an agent needs to invoke or interpret the call is missing.

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 coverage is only 33% and the contract object is an untyped bag with additionalProperties, yet the description fully specifies its sub-keys (envelope min/max, interfaces origin/z_axis/tol_mm/angle_tol_deg, feature kinds gear/bore/extent with their fields, intent bool) and the 'give at least one' constraint. This compensates completely for the schema gap.

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 and resource — a build-time self-check of a component's shaped object against its manifest contract slice — and pins the scope ('on its OWN part before save'). The RFC reference and the 'inspection only' clause leave no ambiguity about what the tool does versus the many build/mutate siblings.

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 when to call it (pre-save, on your own part) and why (local cheap failure beats build → merge → gate-fail → rebuild), and notes it is loop-safe. The one gap is that it never contrasts itself with the near-identical sibling component_contract_check or envelope_check/interface_align_check, which overlap heavily with its contract keys.

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