Skip to main content
Glama
gleachkr
by gleachkr

prove_lean_file

Submit a Lean file to automatically fill in 'sorry' placeholders and generate proofs using the Aristotle theorem prover.

Instructions

Submits a local Lean file to Aristotle to fill in 'sorry' placeholders. Returns the Project ID immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:14-38 (handler)
    The handler function for the 'prove_lean_file' MCP tool, including registration via @mcp.tool(). It validates the Lean file path, submits it to Aristotle for proving 'sorry' placeholders using Project.prove_from_file, monitors the project, and returns the project ID.
    @mcp.tool()
    async def prove_lean_file(
        file_path: str,
        ctx: Context | None = None,
    ) -> str:
        """
        Submits a local Lean file to Aristotle to fill in 'sorry' placeholders.
        Returns the Project ID immediately. 
        """
        path = Path(file_path)
        if not path.exists():
            raise FileNotFoundError(f"File not found: {file_path}")
    
        if ctx:
            await ctx.info(f"Submitting {file_path} to Aristotle...")
        
        project_id = await Project.prove_from_file( # type: ignore
            input_file_path=path,
            project_input_type=ProjectInputType.FORMAL_LEAN,
            wait_for_completion=False
        )
        
        monitored_projects.add(project_id)
        return f"Project started with ID: {project_id}."
Behavior2/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 of behavioral disclosure. It mentions that the tool 'Returns the Project ID immediately,' which hints at asynchronous processing and a follow-up tool like 'get_project_status.' However, it lacks details on permissions, rate limits, error handling, or what happens if the file is invalid. For a submission tool with zero annotation coverage, this is a significant gap.

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 highly concise and front-loaded, consisting of two sentences that directly state the action and immediate outcome. Every word earns its place, with no redundant information or fluff, making it easy for an AI agent to parse quickly.

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?

Given the tool's complexity (submission with asynchronous processing), lack of annotations, and presence of an output schema (which likely covers the return value), the description is minimally adequate. It explains the core action and hints at follow-up needs but misses details like error conditions or integration with sibling tools. With an output schema, it doesn't need to explain return values, but behavioral aspects are under-specified.

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?

The description doesn't explicitly discuss parameters, but with only one parameter ('file_path') and 0% schema description coverage, it implies the parameter's purpose through context: submitting a 'local Lean file.' This adds meaningful semantics beyond the bare schema, compensating for the low coverage. Since there's only one parameter, the baseline is high, but it doesn't specify format or constraints.

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?

The description clearly states the tool's purpose: 'Submits a local Lean file to Aristotle to fill in 'sorry' placeholders.' It specifies the verb ('submits'), resource ('local Lean file'), and target system ('Aristotle'). However, it doesn't explicitly differentiate from siblings like 'prove_lean_code' or 'prove_informal', which likely handle different input formats or proving methods.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'prove_lean_code' (which might handle code snippets instead of files) or 'prove_informal' (which might handle informal proofs), nor does it specify prerequisites such as needing a valid Lean file with 'sorry' placeholders. Usage is implied but not explicitly stated.

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/gleachkr/aristotle-mcp'

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