Skip to main content
Glama

audit_lean_proof

Scan Lean 4 proofs for sorry, admit, custom axioms, unsafe blocks, and @[implemented_by] overrides, with optional local Lean compilation to verify soundness.

Instructions

Scan a Lean 4 proof for sorry, admit, custom axioms, unsafe blocks, and @[implemented_by] overrides, and optionally run local lean if installed.

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": {
      "source": "<source>"
    },
    "name": "audit_lean_proof"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesLean 4 source code to audit.
compileNoIf true, also attempt local `lean` compilation (15s timeout). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does add useful behavior beyond the name: the audit is a static scan for specific constructs, and compilation is optional with an environment dependency ('if installed'), implying graceful degradation. It does not say whether findings are reported as a list with locations, whether it fails fast, or that compiling executes the local toolchain on untrusted source — meaningful gaps for a no-annotation tool.

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?

A single well-formed sentence that front-loads the core action and detection targets, then appends the optional step. No filler and nothing redundant.

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?

For a two-parameter tool with no output schema and no annotations, the description covers the input side well by naming the detected constructs. It leaves the return contract implicit — an agent cannot tell whether it gets a findings list, a boolean, or locations — and does not state what happens when `lean` is absent, so it is adequate but not complete.

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 coverage is 100%, with both 'source' and 'compile' documented in the schema, so the baseline is 3. The description's 'optionally run local lean if installed' reinforces the compile flag and adds the environment dependency nuance, but adds no syntax, format, or default information the schema does not already contain.

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?

The description pairs a specific verb ('Scan') with a specific resource ('Lean 4 proof') and enumerates exactly what is detected: sorry, admit, custom axioms, unsafe blocks, and @[implemented_by] overrides. This is far more concrete than any of the listed siblings (visualize, convert, explain, drill), so an agent can select it without opening the schema.

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?

Usage is implied by the description: run this when you want to check a proof for unsoundness markers, and set the compile option when you want a real build. However, it never states exclusions, prerequisites, or when a different tool (e.g. explain_lean_tactic) would be preferable, so the agent must infer the boundary.

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