Skip to main content
Glama

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

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}."

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