Skip to main content
Glama

verify_invariants

Checks whether a supplied artifact, such as code, a diff, or a design, preserves each stated invariant before execution.

Instructions

Check whether a supplied artifact preserves each stated invariant.

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": {
      "artifact": "<artifact>",
      "invariants": "<invariants>"
    },
    "name": "verify_invariants"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoOptional goals or constraints.
artifactYesThe code, diff, or design to check.
invariantsYesConditions the artifact must preserve.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not explain what a successful check returns, whether verification is per-invariant or aggregate, how failures are reported, or whether the operation has any side effects.

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?

The description is a single front-loaded sentence with no wasted wording. It is appropriately sized, though its brevity contributes to gaps assessed under other dimensions.

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

Completeness2/5

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

For a three-parameter verification tool with no annotations and no output schema, the definition is too sparse. It does not explain the result shape, how invariants are evaluated, or what the agent should expect when an invariant is not preserved.

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 all three parameters are already well documented. The description adds only a high-level restatement of artifact and invariants and says nothing about the optional context parameter beyond what the schema provides.

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 states a specific verb-resource pair: checking whether an artifact preserves stated invariants. It is clear what the tool does, but it does not explicitly distinguish itself from siblings audit_diff and review_plan.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as audit_diff or review_plan. The description implies a verification use case but does not state exclusions, prerequisites, or selection criteria.

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