Skip to main content
Glama
nickharris808

formal-proof-mcp

lean_check

Compile Lean 4 snippets to verify proofs. Returns the compiler verdict, exposing real errors for repair, and reports unavailable when no Lean toolchain is installed.

Instructions

Compile a Lean 4 snippet and return the compiler's verdict. On failure the real error is returned so the agent can repair its own proof. If no Lean toolchain is installed the result is unavailable — never a pass.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesLean 4 source
timeoutNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/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. It discloses that failures return the real error, and that a missing toolchain results in 'unavailable' rather than a pass, giving an honest account of likely outcomes.

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 three sentences, direct, and free of unnecessary detail. It front-loads the core purpose and then adds important edge-case behavior efficiently.

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

Completeness4/5

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

The description covers the main purpose and failure modes, which is helpful given there is no output schema. However, it does not describe the success response format or timeout behavior, leaving some context incomplete.

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?

The schema already describes 'source' as 'Lean 4 source', and the description's 'snippet' adds little. The 'timeout' parameter has no semantic explanation (e.g., units or default behavior), so the description does not fully compensate 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?

The description clearly states the tool compiles a Lean 4 snippet and returns the compiler's verdict, using a specific verb ('compile') and a specific resource ('Lean 4 snippet'). It also distinguishes the tool's behavior in failure and environment-missing cases.

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?

The description gives clear context for when the tool is appropriate—when a Lean 4 snippet needs checking—and explains failure is repairable. It does not explicitly compare with sibling tools or state when not to use it, so it falls short of a perfect score.

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