Skip to main content
Glama

lean_multi_attempt

Test multiple Lean code snippets at a line to compare tactics and approaches. Returns goal states and diagnostics for each alternative.

Instructions

Try multiple Lean code snippets at a line and get the goal state and diagnostics for each.

Use to compare tactics or approaches.
Use rarely-prefer direct file edits to keep users involved.
For a single snippet, edit the file and run `lean_diagnostic_messages` instead.

Note:
    Only single-line, fully-indented snippets are supported.
    Avoid comments for best results.

Args:
    file_path (str): Abs path to Lean file
    line (int): Line number (1-indexed)
    snippets (List[str]): List of snippets (3+ are recommended)

Returns:
    List[str] | str: Diagnostics and goal states or error msg

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYes
snippetsYes
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the burden of explaining behavior. It discloses key constraints: 'Only single-line, fully-indented snippets are supported' and 'Avoid comments for best results.' It also notes the recommendation of '3+ snippets' and describes the return type. However, it does not explicitly state whether the tool modifies the file or is purely read-only, leaving a minor gap in transparency.

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 well-structured with a summary, usage guidelines, note, args, and returns. It is concise and every sentence adds value—no fluff or repetition.

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?

The tool has 3 required parameters, no annotations, but has an output schema. The description covers purpose, usage, constraints, parameter details, and return type. It is comprehensive enough for an agent to decide when and how to invoke it, and it explicitly references the output as 'List[str] | str'.

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 description coverage is 0%, so the description compensates by explaining each parameter: file_path as 'Abs path to Lean file', line as 'Line number (1-indexed)', and snippets as 'List of snippets (3+ are recommended)'. This adds meaning beyond the basic schema titles, though it could be more detailed about the exact role of 'line'.

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's purpose: 'Try multiple Lean code snippets at a line and get the goal state and diagnostics for each.' This specific verb+resource+outcome clearly distinguishes it from siblings like `lean_diagnostic_messages` and `lean_goal`, which handle single snippets or goal states.

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?

Explicit usage guidance is provided: 'Use to compare tactics or approaches. Use rarely-prefer direct file edits to keep users involved. For a single snippet, edit the file and run `lean_diagnostic_messages` instead.' This tells the agent when to use this tool and when to use an alternative, and even names the alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/project-numina/lean-lsp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server