Skip to main content
Glama

lean_multi_attempt

Destructive

Try multiple Lean tactics at a specific line without changing the file, and return the goal state produced by each attempt.

Instructions

Try multiple tactics without modifying file. Returns goal state for each.

Input Schema

NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnNoColumn (1-indexed). Omit to target the tactic line
snippetsYesTactics to try (3+ recommended)
file_pathYesAbsolute or project-root-relative path to Lean file

Output Schema

NameRequiredDescriptionDefault
itemsNoList of attempt results

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.31.0
    • addedOutput schema / $defs / DiagnosticCategory
      Added value: +{
      +  "enum": [
      +    "diagnostic",
      +    "linter",
      +    "sorry",
      +    "suggestion"
      +  ],
      +  "title": "DiagnosticCategory",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / DiagnosticMessage / properties / category
      Added value: +{
      +  "$ref": "#/$defs/DiagnosticCategory",
      +  "default": "diagnostic",
      +  "description": "'linter' is style noise (unused variables and the like) that does not block compilation; 'sorry' marks an unproved declaration and is never noise; 'suggestion' carries a `Try this:` replacement; 'diagnostic' is everything else."
      +}
    • addedOutput schema / $defs / DiagnosticMessage / properties / hint
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Guidance for a recognised failure mode, when one applies",
      +  "title": "Hint"
      +}
  2. Changed2 schema fields changedv0.28.0
    • addedOutput schema / $defs / AttemptResult / properties / proof_status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "REPL proof status when available (e.g. 'Completed', 'Incomplete: contains sorry')",
      +  "title": "Proof Status"
      +}
    • addedOutput schema / $defs / DiagnosticMessage / properties / lean_tags
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Lean-specific tags: 'unsolvedGoals' (proof incomplete here) or 'goalsAccomplished' (proof finished). Machine-readable proof status - prefer over string-matching the message.",
      +  "title": "Lean Tags"
      +}
  3. Addedv0.10.0
  4. Removedv0.23.1
  5. First observed

TDQS

C2.9/5.0
Behavior2/5

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

The description claims the operation happens 'without modifying file', yet annotations declare readOnlyHint=false and destructiveHint=true. If attempts touch editor/buffer state or are reverted afterward, that should be stated; if truly read-only, the annotations are at odds with the text. Either way the agent is left without a reliable side-effect picture.

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, front-loaded with the action and followed by the return shape; no filler. It is terse to the point of under-specification, but nothing is wasted.

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?

An output schema exists so return values need not be explained, but for an openWorld, destructive-hinted tool the description should cover side effects on file state, whether attempts are reverted, or cost/rate considerations. Those are absent, and the 'without modifying file' claim leaves the safety profile unresolved.

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 line, column, snippets, and file_path are already documented in structured fields. The description adds no extra meaning (e.g., what a 'tactic' snippet should look like, whether snippets are full proofs or single tactics), so the baseline 3 applies.

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 resource: try multiple tactics at a position in a Lean file, and returns the resulting goal state for each. This is distinguishable from siblings like lean_goal or lean_run_code, though it never names those alternatives to sharpen the distinction.

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 when-to-use guidance: no mention of when to prefer this over lean_run_code, lean_hammer_premise, or lean_code_actions, and no prerequisites (e.g., file must be open/elaborated). The only hint, '3+ recommended', lives in the schema, not the description.

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