Skip to main content
Glama

lean_verify

Destructive

Verify a Lean theorem's axioms and optionally scan its source file for suspicious patterns; scans only the specified file, not imports.

Instructions

Check theorem axioms + optional source scan. Only scans the given file, not imports.

Input Schema

NameRequiredDescriptionDefault
file_pathYesAbsolute path to Lean file
scan_sourceNoScan source file for suspicious patterns
theorem_nameYesFully qualified name (e.g. `Namespace.theorem`)

Output Schema

NameRequiredDescriptionDefault
trustNoWorst case in `axioms`. 'standard' is the ordinary Mathlib basis; 'incomplete' means sorryAx, so it is not a proof; 'native' means native_decide, trusting the compiler rather than the kernel; 'custom' means other axioms are in play.standard
axiomsNoAxioms used. Standard 3: propext, Classical.choice, Quot.sound
warningsNoSuspicious source patterns (if enabled)
non_standard_axiomsNoAxioms outside the standard 3 — the reason for `trust`

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.31.0
    • addedOutput schema / $defs / AxiomTrust
      Added value: +{
      +  "enum": [
      +    "standard",
      +    "incomplete",
      +    "native",
      +    "custom"
      +  ],
      +  "title": "AxiomTrust",
      +  "type": "string"
      +}
    • addedOutput schema / properties / non_standard_axioms
      Added value: +{
      +  "description": "Axioms outside the standard 3 — the reason for `trust`",
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Non Standard Axioms",
      +  "type": "array"
      +}
    • addedOutput schema / properties / trust
      Added value: +{
      +  "$ref": "#/$defs/AxiomTrust",
      +  "default": "standard",
      +  "description": "Worst case in `axioms`. 'standard' is the ordinary Mathlib basis; 'incomplete' means sorryAx, so it is not a proof; 'native' means native_decide, trusting the compiler rather than the kernel; 'custom' means other axioms are in play."
      +}
  2. Addedv0.10.0

TDQS

A3.5/5.0
Behavior3/5

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

The description usefully discloses scan scope (only the given file, not imports), which is behavior not visible in the schema. However, the annotations declare destructiveHint=true, readOnlyHint=false and idempotentHint=false for what reads like a pure verification operation, and the description never explains what is mutated or destroyed or what permissions are needed, leaving a notable gap.

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?

Two short sentences with zero waste and the core action front-loaded, followed immediately by the scope caveat. The telegraphic phrasing ('Check theorem axioms') is slightly compressed but not ambiguous.

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?

An output schema exists, so return values need no explanation, and the three parameters are fully documented in the schema. What is missing is any reconciliation of the destructive, non-idempotent annotation profile with a verification action, which matters for an agent deciding whether to call it casually.

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 the baseline is 3, and the description adds a bit by framing scan_source as an optional source scan and by stating the scan is limited to the given file. It does not clarify the absolute-path or fully-qualified-name requirements, but the schema already carries those.

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 concrete verb and object: 'Check theorem axioms' plus an optional source scan. This is clearly not a build, search, or diagnostic tool, so it separates reasonably from siblings, though it never names an alternative or explicitly says it is the axiom/sorry-check tool.

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

Usage Guidelines3/5

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

The clause 'Only scans the given file, not imports' implies a scoping rule and hints that callers wanting dependency coverage must look elsewhere, but there is no explicit when-to-use or when-not-to-use guidance relative to lean_diagnostic_messages, lean_build, or other verification-adjacent siblings.

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