Skip to main content
Glama

assura_ir_verify

Verify Implementation IR against an Assura contract with SMT solvers, returning per-clause results, counterexamples, and progress to drive the AI verification loop.

Instructions

Verify an Implementation IR against an Assura contract using SMT solvers (Z3/CVC5). Returns per-clause verification results with counterexamples and progress tracking. The core tool for the AI verification loop: generate IR, submit for verification, and read feedback. Stop when there is no Counterexample. Unknown is acceptable because some features are not encoded in SMT; do not keep rewriting the IR because a clause is Unknown. Provide contract via source/file and IR via ir/ir_file. When the file has more than one contract, pass decl (same names as assura_ir_prompt) so IR is not checked against the first contract only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "assura_ir_verify"
  }
}

Input Schema

NameRequiredDescriptionDefault
irNoImplementation IR source text (inline). Provide either `ir` or `ir_file`.
declNoContract name when the file has more than one `contract` (same as `assura_ir_prompt`).
fileNoPath to an .assura contract file. Provide either `source` or `file`.
sourceNoAssura contract source (inline). Provide either `source` or `file`.
ir_fileNoPath to an .ir file. Provide either `ir` or `ir_file`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it names the solver backends, discloses the three outcome classes (counterexample, verified, Unknown), and states that Unknown arises because some features are not SMT-encoded. It omits cost/latency behavior and whether verification is side-effect free, which for an expensive solver-backed call would be worth stating.

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 action and return shape, then usage rules, then parameter routing — a sensible order. Slightly overweighted: the Unknown guidance spans two sentences, and the backend parenthetical is minor detail, but nothing is genuinely redundant.

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?

No output schema exists, and the description compensates by describing the return as per-clause results with counterexamples and progress tracking. Combined with the parameter routing and stopping rule, an agent has everything needed to call it and interpret the result.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds the either/or pairing semantics ('Provide contract via `source`/`file` and IR via `ir`/`ir_file`') that the schema only states per-field. The `decl` guidance adds a real consequence — IR checked against the first contract only — plus a cross-reference to `assura_ir_prompt`, which the schema does not convey.

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?

States a specific verb and resource ('Verify an Implementation IR against an Assura contract') plus the mechanism (SMT solvers Z3/CVC5), which is unambiguous. It references `assura_ir_prompt` for `decl` naming, but never contrasts itself with siblings like `assura_check` or `assura_infer`, so an agent must infer the boundary from names alone.

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 frames the tool as the core of a loop (generate IR, submit, read feedback) and gives a concrete stopping rule: 'Stop when there is no Counterexample.' It also gives a when-not rule — do not keep rewriting on Unknown — which is exactly the guidance an agent needs to avoid a retry spiral.

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