Skip to main content
Glama

MCP server that allows agentic interaction with the Lean theorem prover via the Language Server Protocol using leanclient. This server provides a range of tools for LLM agents to understand, analyze and interact with Lean projects.

Key Features

  • Rich Lean Interaction: Access diagnostics, goal states, term information, hover documentation and more.

  • External Search Tools: Use LeanSearch, Loogle, Lean Finder, Lean Hammer and Lean State Search to find relevant theorems and definitions.

  • Easy Setup: Simple configuration for various clients, including VSCode, Cursor and Claude Code.

Related MCP server: TypeScript LSP MCP

Setup

Overview

  1. Install uv, a Python package manager.

  2. Make sure your Lean project builds quickly by running lake build manually.

  3. Configure your IDE/Setup

  4. (Optional, highly recommended) Install ripgrep (rg) for local search and source scanning (lean_verify warnings).

1. Install uv

Install uv for your system. On Linux/MacOS: curl -LsSf https://astral.sh/uv/install.sh | sh

1b. Alternative: Install with Nix

If you use Nix, you can install the package directly from GitHub:

nix profile install github:oOo0oOo/lean-lsp-mcp

Or run it without installing: nix run github:oOo0oOo/lean-lsp-mcp.

This provides the MCP server only. You still need a Lean toolchain (elan/lake) for your project, same as the uv setup below.

2. Run lake build

lean-lsp-mcp will run lake serve in the project root to use the language server (for most tools). Some clients (e.g. Cursor) might timeout during this process. Therefore, it is recommended to run lake build manually before starting the MCP. This ensures a faster build time and avoids timeouts.

3. Configure your IDE/Setup

Install in VS Code

Install in VS Code Insiders

OR using the setup wizard:

Ctrl+Shift+P > "MCP: Add Server..." > "Command (stdio)" > "uvx lean-lsp-mcp" > "lean-lsp" (or any name you like) > Global or Workspace

OR manually adding config by opening mcp.json with:

Ctrl+Shift+P > "MCP: Open User Configuration"

and adding the following

{
    "servers": {
        "lean-lsp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "lean-lsp-mcp"
            ]
        }
    }
}

If you installed VSCode on Windows and are using WSL2 as your development environment, you may need to use this config instead:

{
    "servers": {
        "lean-lsp": {
            "type": "stdio",
            "command": "wsl.exe",
            "args": [
                "uvx",
                "lean-lsp-mcp"
            ]
        }
    }
}

If that doesn't work, you can try cloning this repository and replace "lean-lsp-mcp" with "/path/to/cloned/lean-lsp-mcp".

  1. "+ Add a new global MCP Server" > ("Create File")

  2. Paste the server config into mcp.json file:

{
    "mcpServers": {
        "lean-lsp": {
            "command": "uvx",
            "args": ["lean-lsp-mcp"]
        }
    }
}
# Local-scoped MCP server
claude mcp add lean-lsp uvx lean-lsp-mcp

# OR project-scoped MCP server
# (creates or updates a .mcp.json file in the current directory)
claude mcp add lean-lsp -s project uvx lean-lsp-mcp

You can find more details about MCP server configuration for Claude Code here.

  1. Edit ~/.vibe/config.toml.

  2. Paste the following into the file (e.g. at the end):

[[mcp_servers]]
name = "lean-lsp"
transport = "stdio"
command = "uvx"
args = ["lean-lsp-mcp"]
tool_timeout_sec = 600

If there are no existing MCP servers, you may have to remove mcp_servers = [].

For the local search tool lean_local_search, install ripgrep (rg) and make sure it is available in your PATH.

With any agentic coding platform such as Claude Code or Codex, you can install the Agentic Coding Skill: Lean 4 Theorem Proving. This skill provides additional prompts and templates for interacting with Lean 4 projects, including guidance on using lean-lsp-mcp.

MCP Tools

List of available tools

See Tools documentation for the full list of available tools.

Disabling Tools

Many clients allow the user to disable specific tools manually (e.g. lean_build).

VSCode: Click on the Wrench/Screwdriver icon in the chat.

Cursor: In "Cursor Settings" > "MCP" click on the name of a tool to disable it (strikethrough).

You can also disable tools at server startup:

  • LEAN_MCP_DISABLED_TOOLS: Comma-separated tool names (for example lean_run_code,lean_build).

  • LEAN_MCP_INSTRUCTIONS: Replacement server instructions string.

  • LEAN_MCP_TOOL_DESCRIPTIONS: JSON object to override tool descriptions.

Example:

export LEAN_MCP_DISABLED_TOOLS="lean_run_code,lean_build"
export LEAN_MCP_INSTRUCTIONS="Prefer lean_local_search before remote search tools."
export LEAN_MCP_TOOL_DESCRIPTIONS='{"lean_goal":"Primary proof-state inspection tool."}'

MCP Configuration

This MCP server works out-of-the-box without any configuration. However, a few optional settings are available.

Environment Variables

  • LEAN_LOG_LEVEL: Log level for the server. Options are "INFO", "WARNING", "ERROR", "NONE". Defaults to "INFO".

  • LEAN_LOG_FILE_CONFIG: Config file path for logging, with priority over LEAN_LOG_LEVEL. If not set, logs are printed to stdout.

  • LEAN_PROJECT_PATH: Path to your Lean project root. A valid Lean project root must contain lean-toolchain and either lakefile.lean or lakefile.toml. Relative file_path arguments resolve against this root. This variable is required for streamable-http and sse.

  • LEAN_MCP_DISABLED_TOOLS: Comma-separated list of tool names to remove from MCP tool listing.

  • LEAN_MCP_INSTRUCTIONS: Replacement server instructions string.

  • LEAN_MCP_TOOL_DESCRIPTIONS: JSON object mapping tool names to replacement descriptions.

  • LEAN_MCP_SCRATCH_SLOTS: Number of parallel scratch documents used for snippet trials. Defaults to 1; increase it only when parallel attempts are worth the additional Lean process memory.

  • LEAN_REPL: Set to true, 1, or yes to enable fast REPL-based lean_run_code and line-based lean_multi_attempt (see REPL Setup).

  • LEAN_REPL_PATH: Path to the repl binary. Auto-detected from .lake/packages/repl/ or .lake/packages/REPL/ if not set.

  • LEAN_REPL_TIMEOUT: Per-command timeout in seconds (default: 60).

  • LEAN_REPL_MEM_MB: Max memory per REPL in MB (default: 16384). Only enforced on Linux/macOS.

  • LEAN_LSP_MCP_TOKEN: Secret token for bearer authentication when using streamable-http or sse transport. If set, bearer auth is required for every request.

  • LEAN_BUILD_CONCURRENCY: Build concurrency mode for lean_build. Options: allow (default), cancel, share.

  • LEAN_STATE_SEARCH_URL: URL for a self-hosted premise-search.com instance. Rate limits are skipped when set to a custom backend.

  • LEAN_HAMMER_URL: URL for a self-hosted Lean Hammer Premise Search instance. Rate limits are skipped when set to a custom backend.

  • LEAN_LOOGLE_LOCAL: Set to true, 1, or yes to enable local loogle (see Local Loogle section).

  • LEAN_LOOGLE_CACHE_DIR: Override the cache directory for local loogle (default: ~/.cache/lean-lsp-mcp/loogle).

  • LOOGLE_URL: URL for a self-hosted Loogle instance (default: https://loogle.lean-lang.org). Rate limits are skipped when set to a custom backend.

  • LOOGLE_HEADERS: JSON object of extra HTTP headers for Loogle requests (e.g. '{"X-API-Key": "..."}').

You can also often set these environment variables in your MCP client configuration:

{
    "servers": {
        "lean-lsp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "lean-lsp-mcp"
            ],
            "env": {
                "LEAN_PROJECT_PATH": "/path/to/your/lean/project",
                "LEAN_LOG_LEVEL": "NONE"
            }
        }
    }
}

Transport Methods

The Lean LSP MCP server supports the following transport methods:

  • stdio: Standard input/output (default)

  • streamable-http: HTTP streaming

  • sse: Server-sent events (MCP legacy, use streamable-http if possible)

stdio supports project inference and switching as you move between Lean projects. streamable-http and sse are single-project deployments: they require LEAN_PROJECT_PATH at startup and reject tool-driven project switching.

You can specify the transport method using the --transport argument when running the server. For sse and streamable-http you can also optionally specify the host and port:

uvx lean-lsp-mcp --transport stdio # Default transport
uvx lean-lsp-mcp --transport streamable-http # Available at http://127.0.0.1:8000/mcp
uvx lean-lsp-mcp --transport sse --host localhost --port 12345 # Available at http://localhost:12345/sse
uvx lean-lsp-mcp --version # Print the installed version

OpenAI Secure MCP Tunnel

For ChatGPT, Codex, Responses API, or other OpenAI surfaces, use OpenAI Secure MCP Tunnel instead of exposing lean-lsp-mcp to the public internet. Create a tunnel in Platform tunnel settings, then run tunnel-client on a host that can reach your Lean project:

export CONTROL_PLANE_API_KEY="sk-..."

tunnel-client init \
  --sample sample_mcp_stdio_local \
  --profile lean-lsp-local \
  --tunnel-id tunnel_0123456789abcdef0123456789abcdef \
  --mcp-command "uvx lean-lsp-mcp --transport stdio --lean-project-path /path/to/lean/project"

tunnel-client doctor --profile lean-lsp-local --explain
tunnel-client run --profile lean-lsp-local

Use --lean-project-path so relative file_path arguments resolve inside the intended Lean project. For HTTP, bind lean-lsp-mcp to loopback and use --mcp-server-url http://127.0.0.1:8000/mcp in the tunnel profile:

export LEAN_PROJECT_PATH="/path/to/lean/project"
uvx lean-lsp-mcp --transport streamable-http --host 127.0.0.1 --port 8000

Keep tunnel-client run healthy while testing connector discovery or tool calls. In ChatGPT connector settings, choose Tunnel as the connection type.

Bearer Token Authentication

Transport via streamable-http and sse supports bearer token authentication. For private OpenAI access, prefer OpenAI Secure MCP Tunnel; bearer auth remains available for HTTP/SSE deployments that clients reach directly.

Set the LEAN_LSP_MCP_TOKEN environment variable (or see section 3 for setting env variables in MCP config) to a secret token before starting the server. If this variable is set, requests without a matching Authorization: Bearer ... header are rejected before tool dispatch.

Example Linux/MacOS setup:

export LEAN_LSP_MCP_TOKEN="your_secret_token"
uvx lean-lsp-mcp --transport streamable-http

Clients should then include the token in the Authorization header.

REPL Setup

Enable fast REPL-based lean_run_code and line-based lean_multi_attempt. Uses leanprover-community/repl tactic mode. Exact column-based attempts still use the LSP path.

1. Add REPL to your Lean project's lakefile.toml:

[[require]]
name = "repl"
git = "https://github.com/leanprover-community/repl"
rev = "v4.25.0"  # Match your Lean version

2. Build it:

lake build repl

3. Enable via CLI or environment variable:

uvx lean-lsp-mcp --repl

# Or via environment variable
export LEAN_REPL=true

The REPL binary is auto-detected from .lake/packages/repl/ or .lake/packages/REPL/. Falls back to LSP if not found.

Path Policy

File-based tools only operate on files inside the active Lean project, resolved .lake/packages/* dependencies, and the Lean stdlib source tree. Returned file paths are sanitized to avoid leaking host absolute paths:

  • Project files are returned relative to the project root, for example src/MyFile.lean.

  • Dependency files are returned under .lake/packages/<package>/....

  • Stdlib files are returned under .lean-stdlib/....

Symlink escapes outside those roots are rejected.

Local Loogle

Run Loogle locally to avoid the remote API's rate limit (3 req/30s). The binary is built once for the project's Lean toolchain. The first Mathlib index takes a few minutes; subsequent starts load it in seconds.

# Enable via CLI
uvx lean-lsp-mcp --loogle-local

# Or via environment variable
export LEAN_LOOGLE_LOCAL=true

Requirements: git, lake (elan), a built Mathlib project, and substantial memory for indexing. In measurements on current Mathlib, the initial index used ~13 GiB peak RSS and a warm load used ~7 GiB.

Note: Local loogle is currently only supported on Unix systems (Linux/macOS). Windows users should use WSL or the remote API.

Mathlib comes from your project: --lean-project-path must point at a built project that depends on Mathlib. The local binary is compiled for that project's Lean toolchain and runs through lake env, so Lake supplies the project's own dependency environment. Loogle's native dependency hash detects changed .olean files and rebuilds a stale index automatically.

Falls back to remote API if local loogle fails.

Notes on MCP Security

There are many valid security concerns with the Model Context Protocol (MCP) in general!

This MCP server is meant as a research tool and is currently in beta. While it does not handle any sensitive data such as passwords or API keys, it still includes various security risks:

  • Access to your local file system.

  • Powerful local build and analysis capabilities.

  • External network access for remote search tools unless disabled by the operator.

Please be aware of these risks. Feel free to audit the code and report security issues!

Build image:

docker build -t lean-lsp-mcp:containerized .

Run with a mounted project root (read-only source + writable Lake cache):

docker run --rm -i \
  -v "$PWD":/workspace:ro \
  -v lean-lsp-mcp-lake-cache:/workspace/.lake \
  lean-lsp-mcp:containerized

The included Docker image defaults to:

  • LEAN_PROJECT_PATH=/workspace

  • LEAN_MCP_DISABLED_TOOLS=lean_run_code

Notes:

  • LEAN_MCP_DISABLED_TOOLS is a startup default and can be overridden by docker run -e.

  • Using --network none can break tools that require network access (leansearch, loogle, leanfinder, state_search, hammer_premise) and dependency downloads.

  • The entrypoint exits immediately if LEAN_PROJECT_PATH does not exist.

For more information, you can use Awesome MCP Security as a starting point.

Development

See Adding a new tool for a step-by-step guide to implementing a new MCP tool (return models, helper modules, registration, tests, and docs).

MCP Inspector

npx @modelcontextprotocol/inspector uvx --with-editable path/to/lean-lsp-mcp python -m lean_lsp_mcp.server

Run Tests

uv sync --all-extras
uv run pytest tests

Publications and Formalization Projects using lean-lsp-mcp

  • Ax-Prover: A Deep Reasoning Agentic Framework for Theorem Proving in Mathematics and Quantum Physics arxiv

  • Numina-Lean-Agent: An Open and General Agentic Reasoning System for Formal Mathematics arxiv github

  • MerLean: An Agentic Framework for Autoformalization in Quantum Computation arxiv

  • M2F: Automated Formalization of Mathematical Literature at Scale arxiv

  • A Group-Theoretic Approach to Shannon Capacity of Graphs and a Limit Theorem from Lattice Packings github

Talks

lean-lsp-mcp: Tools for agentic interaction with Lean (Lean Together 2026) youtube

License & Citation

MIT licensed. See LICENSE for more information.

Citing this repository is highly appreciated but not required by the license.

@software{lean-lsp-mcp,
  author = {Oliver Dressler},
  title = {{Lean LSP MCP: Tools for agentic interaction with the Lean theorem prover}},
  url = {https://github.com/oOo0oOo/lean-lsp-mcp},
  month = {3},
  year = {2025}
}

Available Tools

23 tools
lean_buildA
DestructiveIdempotent

Build the Lean project and restart LSP. Use only if needed (e.g. new imports).

ParametersJSON Schema
NameRequiredDescriptionDefault
cleanNoRun lake clean first (slow)
fetch_cacheNoRun lake exe cache get before building (slow)
output_linesNoReturn last N lines of build log (0=none)
lean_project_pathNoPath to Lean project

Output Schema

ParametersJSON Schema
NameRequiredDescription
errorsNoBuild errors if any
outputYesBuild output
successYesWhether build succeeded

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already provide destructiveHint=true and idempotentHint=true. The description adds 'restart LSP' as a behavioral detail. There is no contradiction, and the description adds moderate context beyond annotations.

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 very concise: two sentences that front-load the purpose and usage guidance. No wasted words, every part adds value.

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?

Given the tool has an output schema (implied) and annotations cover key traits, the description adequately covers the tool's role. It lacks details about failure modes or logs but is sufficient for a tool meant for occasional use.

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 the schema fully documents each parameter. The description does not add additional semantics beyond what is in the schema, earning a baseline of 3.

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: building the Lean project and restarting LSP. This distinguishes it from sibling tools which are inspection or analysis tools (e.g., lean_hover_info, lean_goal), as building is a distinct action.

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 includes 'Use only if needed (e.g. new imports)', providing context for when to use. However, it does not explicitly mention when not to use or suggest alternatives, which is acceptable given the specialized nature.

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

lean_code_actionsA
Read-onlyIdempotent

Get LSP code actions for a line. Returns resolved edits for TryThis suggestions (simp?, exact?, apply?) and other quick fixes.

ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
file_pathYesAbsolute path to Lean file

Output Schema

ParametersJSON Schema
NameRequiredDescription
actionsNoList of available code actions

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and idempotentHint=true, matching the read-only nature. Description adds specifics about returning resolved edits for TryThis suggestions, which goes beyond annotations.

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?

Two concise sentences that front-load the purpose. Every word earns its place with no redundancy.

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?

Given output schema exists, description sufficiently covers what the tool returns. Mentions specific types of suggestions. Could elaborate on return format but still adequate.

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 covers both parameters with descriptions (100% coverage). Description does not add any extra detail beyond what schema provides.

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?

Description clearly states verb 'Get', resource 'LSP code actions for a line', and specifies it returns resolved edits for TryThis suggestions and other quick fixes. Distinct from siblings like lean_build, lean_completions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implicit: it returns code actions for a line. No explicit when-to-use/when-not-to-use or alternative tools mentioned.

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

lean_completionsA
Read-onlyIdempotent

Get IDE autocompletions. Use on INCOMPLETE code (after . or partial name).

ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed characters)
file_pathYesAbsolute or project-root-relative path to Lean file
max_completionsNoMax completions
resolve_detailsNoFetch type signatures for the top N results

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoList of completion items

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, indicating safe, idempotent behavior. The description adds the usage constraint (incomplete code), which is a behavioral nuance beyond the annotations. No contradiction.

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 two sentences, front-loading the purpose and then providing a usage hint. Every word earns its place; no redundancy.

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?

Given the existence of an output schema and annotations, the description adequately covers the core functionality. It could optionally mention that completions are context-dependent on the file state, but it is otherwise sufficient.

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% with clear parameter descriptions. The tool description does not add additional meaning beyond what the schema already provides. Baseline of 3 is appropriate.

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 retrieves IDE autocompletions, specifying it should be used on incomplete code after a dot or partial name. This verb+resource+scope is distinct from sibling tools like lean_hover_info or lean_goal.

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 explicitly states when to use the tool ('on INCOMPLETE code (after `.` or partial name)'), providing clear context. It does not explicitly mention when not to use or list alternatives, but the sibling tool set makes differentiation implicit.

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

lean_declaration_fileA
Read-onlyIdempotent

Get the source of a symbol's declaration (declaration slice + context).

Set full_file=True for the whole file (can be very large).
ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYesSymbol (case sensitive, must be in file)
file_pathYesAbsolute or project-root-relative path to Lean file
full_fileNoReturn the entire declaration file (large!)
context_linesNoLines of context around the declaration

Output Schema

ParametersJSON Schema
NameRequiredDescription
contentYesDeclaration source (sliced unless full_file=True)
end_lineNoLast line of the returned slice (1-indexed)
file_pathYesPath to declaration file
start_lineNoFirst line of the returned slice (1-indexed)
total_linesNoTotal lines in the declaration file

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint. The description adds that full_file returns the entire file and can be very large, which is useful behavioral context. However, it does not mention error cases (e.g., symbol not found) or performance implications beyond size.

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?

Two sentences, front-loaded with the core purpose, and the second sentence addresses a key option. No wasted words.

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?

Given an output schema exists, the description does not need to detail return values. It adequately covers the main functionality and the key parameter option. Could mention the output format briefly, but not necessary.

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 coverage is 100% with descriptions for all 4 parameters. The description adds minimal extra meaning beyond the schema, only reinforcing the size warning for full_file. Baseline 3 is appropriate as schema handles most semantic load.

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 retrieves the source of a symbol's declaration, specifying 'declaration slice + context'. This distinctively separates it from sibling tools like lean_hover_info or lean_goal, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly suggests using full_file for whole file context but does not explicitly guide when to prefer this tool over siblings like lean_file_outline or lean_hover_info. No when-not-to-use or alternative references are provided.

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

lean_diagnostic_messagesB
Read-onlyIdempotent

Get compiler diagnostics (errors, warnings, infos) for a Lean file.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_lineNoFilter to line
severityNoFilter by severity level. Returns all levels when omitted.
file_pathYesAbsolute or project-root-relative path to Lean file
timeout_sNoMax seconds to wait for elaboration. On timeout returns partial=true with still_elaborating_lines - poll again. Omit to wait for full elaboration.
start_lineNoFilter from line
interactiveNoReturns verbose nested TaggedText with embedded widgets. Only use when plain text is insufficient. For 'Try This' suggestions, prefer lean_code_actions.
declaration_nameNoFilter to declaration (slow)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

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

The annotations declare readOnlyHint=true and idempotentHint=true, which align with the read-only nature of fetching diagnostics. The description adds minimal extra behavior (listing error/warning/info types) but does not mention timeout/partial result behavior, which is described in the schema.

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?

One concise sentence, no redundant information. Front-loaded with the core purpose.

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?

While the schema fully documents parameters and output schema exists, the tool has 7 parameters and several behavioral nuances (timeout partial results, interactive widgets). The description is limited to a one-line summary and doesn't mention these capabilities or direct users to lean_code_actions for 'Try This' suggestions, so it's adequate but not comprehensive.

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 has 100% description coverage for all 7 parameters, so the baseline is 3. The description itself does not add any parameter semantics beyond the schema, such as the filtering options (severity, line range, declaration_name).

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 states 'Get compiler diagnostics (errors, warnings, infos) for a Lean file' — a clear verb+resource. It does not explicitly distinguish from sibling tools like lean_build or lean_verify, so it scores 4 rather than 5.

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?

No guidance is provided about when to use this tool versus alternatives. There is no mention of filtering by severity or line, or that 'Try This' suggestions should use lean_code_actions, which appears both in the schema and sibling list.

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

lean_file_outlineA
Read-onlyIdempotent

Get imports and declarations with type signatures. Token-efficient.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute or project-root-relative path to Lean file
max_declarationsNoMax declarations to return

Output Schema

ParametersJSON Schema
NameRequiredDescription
importsNoImport statements
declarationsNoTop-level declarations
total_declarationsNoTotal count (set when truncated)

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, which cover key behavioral traits. The description adds 'token-efficient', which provides additional context about the output format, but does not disclose any other behaviors like required permissions or side effects. Given the annotations, this is adequate but not exceptional.

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 consists of two terse sentences (7 words total) that front-load the key action and a performance hint. Every word serves a purpose, with no redundancy or filler.

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?

Given the tool's simplicity, full parameter descriptions in the schema, comprehensive annotations, and the presence of an output schema, the description provides sufficient context for invocation. It could be slightly more explicit about the output structure, but that is handled by the output schema.

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 the input schema already documents both parameters thoroughly. The description adds no new parameter-specific information beyond the schema's descriptions, earning the baseline score of 3.

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 returns imports and declarations with type signatures, which directly matches the name 'file_outline'. It distinguishes from siblings like 'lean_declaration_file' which focuses on a single declaration, and 'lean_hover_info' which provides information on specific locations.

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 does not mention prerequisites, limitations, or when not to use it, leaving the agent to infer usage from the name and purpose alone.

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

lean_get_widgetsA
Read-onlyIdempotent

Get panel widgets at a position (proof visualizations, #html, custom widgets). Returns raw widget data - may be large.

ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
file_pathYesAbsolute path to Lean file

Output Schema

ParametersJSON Schema
NameRequiredDescription
widgetsNoWidget instances (id, name, range, props)

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, making the tool's safety profile clear. The description adds extra value by warning that 'data may be large', which is important behavioral context beyond annotations.

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?

Two sentences, front-loaded with the main purpose, and a second sentence providing a critical warning. No unnecessary words or redundancy.

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?

Given the presence of an output schema (handling return format), 100% parameter coverage, and the description providing examples and a size warning, the description is complete for a simple retrieval tool.

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 the schema itself documents all three parameters. The description adds no additional meaning to the parameters, thus baseline 3 is appropriate.

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 retrieves panel widgets at a position, listing examples (proof visualizations, #html, custom widgets). It distinguishes from sibling lean_get_widget_source by noting it returns raw widget data.

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 implies when to use (need panel widgets at a position) but does not explicitly mention when not to use or list alternatives. With many sibling tools, explicit exclusions would be helpful, but the context is still clear.

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

lean_get_widget_sourceA
Read-onlyIdempotent

Get JavaScript source of a widget by hash. Useful for understanding custom widget rendering logic. Returns full JS module - may be large.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to Lean file
javascript_hashYesjavascriptHash from a widget instance

Output Schema

ParametersJSON Schema
NameRequiredDescription
sourceYesWidget source data including JavaScript module

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so safe read. Description adds that 'Returns full JS module - may be large', warning about size, going beyond annotations.

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?

Three short sentences, front-loaded key action, no redundant words. Each sentence adds value.

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?

Covers purpose, usage, and size warning. Output schema exists so return values not needed. Could mention dependency on lean_get_widgets for hash, but not required.

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 has 100% description coverage with clear parameter descriptions. The tool description adds no extra meaning beyond the schema, so baseline 3 is appropriate.

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?

Clearly states verb 'Get', resource 'JavaScript source of a widget', and method 'by hash'. Distinguishes from siblings like lean_get_widgets which likely returns widget instances.

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?

Explicitly mentions 'Useful for understanding custom widget rendering logic', providing when to use. No explicit when-not or alternatives, but context is clear.

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

lean_goalA
Read-onlyIdempotent

Get proof goals at a position. MOST IMPORTANT tool - use often!

Omit column to see goals_before (line start) and goals_after (line end),
showing how the tactic transforms the state. status='complete' means the
proof is finished at this point; status='no_goal_at_position' means the
position carries no proof state (e.g. outside a proof).
ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnNoColumn (1-indexed). Omit for before/after
formatNoOutput format: 'text' (default) or 'structured'text
file_pathYesAbsolute or project-root-relative path to Lean file
timeout_sNoMax seconds to wait for elaboration. On timeout returns status='still_elaborating' - poll again.

Output Schema

ParametersJSON Schema
NameRequiredDescription
goalsNoGoal list at specified column position
statusNoGoal status: 'goals' (open goals), 'complete' (no goals left - proof finished here), 'no_goal_at_position' (position carries no proof state), or 'still_elaborating' (timeout_s hit - poll again)
goals_afterNoGoals at line end (when column omitted)
goals_beforeNoGoals at line start (when column omitted)
line_contextYesSource line where goals were queried

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare readOnlyHint and idempotentHint, and the description adds crucial behavior: column omission reveals before/after states, timeout handling with 'still_elaborating' status, and possible statuses. No contradictions with annotations.

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?

The description is two sentences plus a status explanation. Front-loaded with 'MOST IMPORTANT tool - use often!' which is slightly verbose but adds emphasis. No extraneous information; each sentence serves a purpose.

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?

Given the complexity of a proof goal tool with 5 parameters and an output schema (not shown), the description adequately covers behavior, status outcomes, and column handling. No missing critical information for using the tool effectively.

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 covers 100% of parameters with descriptions. The description adds value by explaining the effect of omitting column (goals_before/goals_after) and the meaning of format enum options, which go beyond the schema's parameter descriptions.

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 'Get proof goals at a position' with a specific verb and resource. It also labels itself as the 'MOST IMPORTANT tool', distinguishing it from siblings like lean_term_goal, lean_state_search, etc., which query different aspects.

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 explains when to omit column for before/after views, and defines status values like 'complete' and 'no_goal_at_position'. It does not explicitly list when to use this vs. other tools, but the context of proof goals and the 'most important' emphasis provides implicit guidance.

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

lean_hammer_premiseA
Read-onlyIdempotent

Limit: 6req/30s. Get premise suggestions for automation tactics at a goal position.

Returns lemma names to try with `simp only [...]`, `aesop`, or as hints.
ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnYesColumn number (1-indexed)
file_pathYesAbsolute or project-root-relative path to Lean file
num_resultsNoMax results

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoList of premise results

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint, openWorldHint, and idempotentHint. The description adds a rate limit (6req/30s) and specifies the return format (lemma names). No contradictions with annotations.

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?

Two sentences plus a rate limit. The purpose is front-loaded, every word adds value, and there is no verbosity. Ideal conciseness.

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?

Given the 4 parameters, full annotation coverage, and presence of an output schema (implied), the description covers purpose, return type, and rate limit. It lacks examples but is adequate for a straightforward suggestion tool.

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 coverage is 100% with descriptions for all 4 parameters. The description adds minimal value beyond the schema, only linking line/column to 'goal position'. Baseline 3 is appropriate.

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 it provides premise suggestions for automation tactics at a goal position, listing specific uses like `simp only [...]`, `aesop`, or hints. This distinguishes it from sibling tools like lean_leansearch or lean_loogle, which are general search tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for getting premise suggestions during automated proof attempts, but does not explicitly state when to use this tool versus alternatives like lean_leansearch or lean_loogle. The rate limit is mentioned but not a usage guideline.

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

lean_hover_infoA
Read-onlyIdempotent

Get type signature and docs for a symbol. Essential for understanding APIs.

ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnYesColumn at START of identifier (1-indexed characters)
file_pathYesAbsolute or project-root-relative path to Lean file

Output Schema

ParametersJSON Schema
NameRequiredDescription
infoYesType signature and documentation
symbolYesThe symbol being hovered
diagnosticsNoDiagnostics at this position

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint. The description adds no further behavioral context (e.g., fails gracefully, requires valid file path). It does not contradict annotations.

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 a single, front-loaded sentence followed by a supporting statement. Every word earns its place, providing clear value without extraneous detail.

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?

Given that the tool has an output schema (not needing output description), and the annotations and parameter descriptions are rich, the description is complete enough. It could mention that the symbol must be resolvable at that position, but not strictly necessary.

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% for all 3 parameters, so baseline is 3. The description does not add additional meaning or usage tips beyond what the schema provides.

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 'Get type signature and docs for a symbol', identifying a specific verb and resource. It distinguishes from numerous sibling tools by focusing on a hover action for symbol information, not code actions or goals.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes 'Essential for understanding APIs', hinting at when to use, but lacks explicit guidance on when not to use or how it compares to alternatives like lean_goal or lean_term_goal.

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

lean_leanfinderA
Read-onlyIdempotent

Limit: 10req/30s. Semantic search by mathematical meaning via Lean Finder.

Examples: "commutativity of addition on natural numbers",
"I have h : n < m and need n + 1 < m + 1", proof state text.

The `version` argument selects which mathlib snapshot to query
(v4.19.0, v4.24.0, or v4.28.0). Default: v4.28.0.
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesMathematical concept or proof state
versionNoMathlib version index to searchv4.28.0
num_resultsNoMax results

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoList of Lean Finder results

TDQS

A3.9/5.0
Behavior4/5

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

Beyond annotations (readOnly, openWorld, idempotent), description adds rate limit, version behavior (default and options), and that it performs semantic search. No contradictions.

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?

Extremely concise: two short paragraphs with rate limit, purpose, examples, and parameter explanation. No wasted sentences, information is front-loaded.

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?

Given the tool's simplicity, description covers purpose, usage constraints, parameter details, and examples. Output schema exists, so return values are covered. No gaps for an agent to select or invoke this tool.

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 coverage is 100%, so minimal extra needed. Description adds example queries for the 'query' parameter and explains version options, but adds no new semantic info for 'num_results'. Baseline 3 is appropriate.

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?

Description clearly states 'semantic search by mathematical meaning via Lean Finder' with examples. Purpose is specific and distinguishable from siblings, but does not explicitly differentiate from similar tools like lean_leansearch or lean_state_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides rate limit (10req/30s) and examples of queries, implying usage for semantic search. However, no explicit guidance on when to use this tool versus alternatives among the many sibling tools.

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

lean_leansearchA
Read-onlyIdempotent

Limit: 90req/30s. Search Mathlib via leansearch.net using natural language.

Examples: "sum of two even numbers is even", "Cauchy-Schwarz inequality",
"{f : A → B} (hf : Injective f) : ∃ g, LeftInverse g f"
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language or Lean term query
num_resultsNoMax results

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoList of LeanSearch results

TDQS

A4.3/5.0
Behavior4/5

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

Adds rate limit information beyond annotations (readOnlyHint, idempotentHint, openWorldHint). No contradictions. However, does not describe response behavior or error conditions.

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?

Very concise, front-loaded with rate limit, then purpose, then examples. Every sentence adds value with no redundancy.

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?

For a simple search tool with output schema, the description covers purpose, parameters, examples, and rate limit. No gaps given the context.

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 coverage is 100%. Description provides example queries for the 'query' parameter, adding practical meaning. No additional detail for 'num_results' but schema is clear.

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?

Explicitly states it searches Mathlib via leansearch.net using natural language. Provides concrete examples distinguishing it from sibling search tools like lean_loogle or lean_local_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Mentions rate limit (90req/30s) but does not clarify when to use this tool vs alternatives like lean_leanfinder or lean_loogle. No explicit exclusions or selection criteria.

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

lean_loogleA
Read-onlyIdempotent

Search Mathlib by type signature via loogle.lean-lang.org.

Examples: `Real.sin`, `"comm"`, `(?a → ?b) → List ?a → List ?b`,
`_ * (_ ^ _)`, `|- _ < _ → _ + 1 < _ + 1`
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesType pattern, constant, or name substring
num_resultsNoMax results

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoList of Loogle results

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=true, which cover the tool's behavioral safety and consistency. The description adds no new behavioral traits beyond stating it searches via an external source (loogle.lean-lang.org), which is consistent with the annotations.

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 extremely concise: two sentences of purpose and one line of examples. Every part earns its place. The purpose is front-loaded, and the examples are directly helpful.

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?

Given the tool's simplicity (search by type signature), the presence of an output schema (not shown but confirmed), and comprehensive annotations, the description is complete. It explains the source, provides examples, and does not need to detail return values.

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 coverage is 100%, but the description adds value by providing concrete examples of valid query strings, which go beyond the schema's generic description ('Type pattern, constant, or name substring'). The num_results parameter is briefly described in the schema but not elaborated in the description, which is fine given its simplicity.

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: 'Search Mathlib by type signature via loogle.lean-lang.org.' This is a specific verb+resource combination that distinguishes it from sibling tools like lean_leansearch (general search) or lean_leanfinder (name search). Examples further clarify the scope.

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 provides concrete examples of valid queries (e.g., `Real.sin`, `?a → ?b → List ?a → List ?b`), which strongly imply when to use this tool—namely for type-based or pattern-based searches. However, it does not explicitly state when not to use it or name alternatives among siblings.

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

lean_minimal_hypothesesA
Read-onlyIdempotent

For each explicit (h : T) hypothesis of a theorem, drop it and re-elaborate a scratch copy of the file. Reports which hypotheses are load-bearing and which are actually unused. Skips implicit {x : α} and instance [inst : C] binders (those are usually inferable / always load-bearing). Does not rewrite the proof body — a body that names h will fail to elaborate without the binder, which is the truthful answer (load-bearing).

Variants are checked in parallel on scratch documents; the file is never edited.
ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to Lean file
theorem_nameYesTheorem name. Either bare (e.g. `add_comm`) or fully qualified (e.g. `Namespace.add_comm`); only the trailing segment is used for source matching.
inactivity_timeoutNoPer-hypothesis elaboration timeout (seconds)

Output Schema

ParametersJSON Schema
NameRequiredDescription
fileYesRelative file path
verdictsNoOne verdict per explicit (h : T) binder, in source order
theorem_nameYesTheorem analyzed
skipped_implicitNoCount of implicit {x : α} / instance [inst] binders not probed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds significant behavioral context: that it creates scratch copies, works in parallel, does not edit the file, and that naming a hypothesis will cause elaboration failure if dropped. This is valuable beyond annotations.

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 two short paragraphs, front-loaded with the core action. Each sentence provides necessary detail (skipping certain binders, behavior of named hypothesis, parallel/scratch nature). No fluff; every sentence earns its place.

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?

Given the tool's complexity (hypothesis testing, parallel elaboration), the description fully explains the mechanism, scope, and non-destructive nature. The presence of an output schema means output format details are not needed in the description. The tool is well-specified for an AI agent.

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?

Since schema description coverage is 100% (all parameters described in schema), the baseline is 3. The description adds the per-hypothesis timeout context for the inactivity_timeout parameter, slightly increasing clarity. No param info is missing, but the description does not elaborate on file_path or theorem_name beyond the schema.

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 that the tool drops each explicit hypothesis of a theorem and re-elaborates to determine which are load-bearing. It distinguishes itself by skipping implicit and instance binders, and explicitly says it does not rewrite the proof body. This precise verb+resource description differentiates it from siblings.

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 explains what the tool does and what it skips (implicit/instance binders), but does not explicitly provide when-to-use or when-not-to-use guidance relative to sibling tools. The context is clear enough for an agent to infer usage, but lacks explicit exclusions or alternative suggestions.

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

lean_multi_attemptA
Read-onlyIdempotent

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

ParametersJSON 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

ParametersJSON Schema
NameRequiredDescription
itemsNoList of attempt results

TDQS

A4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true and idempotentHint=true. The description adds that it returns goal state for each tactic, which is beyond the annotations. It also confirms no file modification. This is good transparency, though it could mention that the tool runs tactics without side effects.

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 a single, focused sentence: 'Try multiple tactics without modifying file. Returns goal state for each.' It is front-loaded with the core action, no superfluous words. Perfectly concise.

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?

Given the tool's simplicity (4 params, output schema, annotations), the description covers the essential purpose and behavior. It might briefly note that results correspond to snippet order. But overall, it is sufficiently complete with minimal gaps.

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 coverage is 100% with adequate descriptions for each parameter. The description mentions 'tactics' and 'goal state', but adds little beyond the schema. The schema already notes '3+ recommended' for snippets, which is not in the description. Baseline 3 is appropriate as schema does the heavy lifting.

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 tactics without modifying file. Returns goal state for each.' It specifies the verb ('try'), the resource ('tactics'), and the result ('goal state'). Among siblings, it uniquely offers multi-tactic trial without file modification, distinguishing it from lean_goal (single goal) and lean_run_code (execution).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for trying multiple tactics read-only, but lacks explicit guidance on when to use versus alternatives. It doesn't state when not to use it, e.g., if a single tactic is needed or if file modification is desired. However, the context of siblings provides some differentiation.

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

lean_profile_proofA
Read-onlyIdempotent

Run lean --profile on a theorem. Returns per-line timing and categories. SLOW - avoid on theorems that already hit heartbeat limits.

ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine where theorem starts (1-indexed)
top_nNoNumber of slowest lines to return
timeoutNoMax seconds to wait
file_pathYesAbsolute or project-root-relative path to Lean file

Output Schema

ParametersJSON Schema
NameRequiredDescription
msYesTotal elaboration time in ms
linesNoTime per source line (>1% of total)
categoriesNoCumulative time by category in ms

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true. The description adds value by disclosing performance characteristics ('SLOW') and the specific output (per-line timing and categories). No contradictions with annotations.

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 two sentences with no extraneous information. It front-loads the core functionality and adds a critical performance warning, earning its place.

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?

Given the tool has an output schema and annotations, the description covers the essential aspects: purpose, output, and a usage constraint. It could be more explicit about alternative tools, but overall it is sufficiently complete for an informed agent.

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 each parameter is already documented. The description does not add additional meaning beyond the schema; e.g., it does not explain the relationship between parameters or provide usage examples. Baseline 3 is appropriate.

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 action ('Run `lean --profile` on a theorem') and the output ('Returns per-line timing and categories'). It distinguishes from sibling tools like lean_build or lean_verify by specifying profiling behavior.

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 explicitly warns against using the tool on theorems that already hit heartbeat limits ('SLOW - avoid...'), providing a clear when-not-to-use condition. However, it does not explicitly mention when to use this tool over alternatives like lean_verify or lean_state_search.

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

lean_referencesA
Read-onlyIdempotent

Find all references to a symbol (including the declaration). Position cursor at the symbol.

ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnYesColumn at START of identifier (1-indexed)
file_pathYesAbsolute path to Lean file
max_resultsNoMax locations to return (default 50)

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoList of reference locations
totalNoTotal matches (> len(items) when truncated by max_results)

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint. The description adds that it includes the declaration, which is a behavioral detail beyond annotations. No contradictions.

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?

Single sentence, clear, no fluff. Every word is necessary and front-loaded.

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?

With an output schema present, return values are covered. The description explains the core function and a key prerequisite. Could mention that it returns locations including declaration, but overall adequate.

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 baseline is 3. The description does not add any additional meaning beyond the schema; it only mentions cursor positioning which relates to line/column but not in detail.

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 uses a specific verb 'Find' with a clear resource 'all references to a symbol', explicitly includes 'including the declaration', and distinguishes from siblings like hover or goal tools by mentioning cursor positioning.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a condition ('Position cursor at the symbol') but does not explicitly state when to use this tool versus alternatives like lean_local_search or lean_loogle, leaving the differentiation implicit.

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

lean_run_codeA
Read-onlyIdempotent

Run a code snippet and return diagnostics. Must include all imports.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesSelf-contained Lean code with imports

Output Schema

ParametersJSON Schema
NameRequiredDescription
successYesWhether code compiled successfully
timed_outNoTrue if elaboration timed out (results are partial)
diagnosticsNoCompiler diagnostics

TDQS

A3.5/5.0
Behavior3/5

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

Annotations declare readOnlyHint, idempotentHint, and openWorldHint, which already indicate safe, idempotent behavior. The description adds that the tool returns diagnostics, but does not elaborate on side effects (none expected), error handling, or output format. It adds marginal transparency beyond annotations.

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?

Two sentences, each purposeful. First sentence states primary action and result; second sentence gives a critical requirement. No wasted words. Information is front-loaded.

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?

For a simple tool with one parameter and an output schema (not shown but exists), the description covers the essential purpose and constraint. It does not explain what 'diagnostics' entails or the environment context, but the output schema likely covers return details. The description is adequate for straightforward use.

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 coverage is 100% with one parameter described as 'Self-contained Lean code with imports'. The description reiterates the requirement to include all imports, reinforcing the schema's meaning. This adds clarity but does not introduce new semantic detail beyond the schema.

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 runs code and returns diagnostics. It uses 'Run a code snippet' as verb+resource, which is specific. However, it does not explicitly distinguish from sibling tools like lean_build or lean_verify, but the context of running a snippet rather than building a project is implied.

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?

No guidance on when to use this tool versus alternatives. It only states a requirement ('Must include all imports'), but does not mention implicit context, prerequisites, or when not to use. Sibling tools like lean_build or lean_verify are not compared.

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

lean_term_goalB
Read-onlyIdempotent

Get the expected type at a position.

ParametersJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnNoColumn (defaults to end of line)
file_pathYesAbsolute or project-root-relative path to Lean file

Output Schema

ParametersJSON Schema
NameRequiredDescription
line_contextYesSource line where term goal was queried
expected_typeNoExpected type at this position

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already indicate read-only and idempotent behavior. The description adds minimal context beyond that (e.g., 'expected type' vs full goal). No contradictions, but little extra value.

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?

Extremely concise single sentence with no wasted words. Information is front-loaded and easily parsed.

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?

While annotations and output schema exist, the description is minimal. It does not explain what the returned 'expected type' looks like or how it relates to the position, leaving some ambiguity.

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 parameters are already documented. The description does not add any extra meaning or context about parameters, but given coverage, baseline 3 is appropriate.

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 retrieves the expected type at a given position, using a specific verb and resource. However, it does not differentiate itself from the sibling tool 'lean_goal', which likely has a similar purpose.

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?

No guidance is provided on when to use this tool versus alternatives like 'lean_goal'. The description lacks context on scenarios or limitations, leaving the agent to guess.

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

lean_verifyA
Read-onlyIdempotent

Check theorem axioms + optional source scan. Only scans the given file, not imports.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to Lean file
scan_sourceNoScan source file for suspicious patterns
theorem_nameYesFully qualified name (e.g. `Namespace.theorem`)

Output Schema

ParametersJSON Schema
NameRequiredDescription
axiomsNoAxioms used. Standard 3: propext, Classical.choice, Quot.sound
warningsNoSuspicious source patterns (if enabled)

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true, so the description's mention of file scanning scope complements but doesn't significantly exceed what the annotations provide.

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 extremely concise with two sentences, the first stating the main purpose and the second adding a key constraint. No wasted words.

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?

Given the output schema and annotations, the description sufficiently covers the tool's operation. The file scope constraint is a critical detail that is present.

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 parameters are fully documented. The description adds minimal extra semantics about file scope but doesn't elaborate on parameter formats or constraints beyond the schema.

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 checks theorem axioms and optionally scans source files. It distinguishes itself by noting it only scans the given file, not imports, which differentiates it from siblings like lean_build.

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 implicitly suggests when to use (for verification of a specific theorem) and explicitly notes the scope constraint. However, it doesn't mention when not to use or suggest alternatives like lean_build for full projects.

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

TDQS

A4/5.0
Disambiguation5/5

All 23 tools have clearly distinct purposes with no significant overlap. Search tools (leanfinder, leansearch, loogle, state_search) are differentiated by query type (semantic, natural language, type signature, premise), and tools like lean_goal vs lean_term_goal serve different roles (proof state vs expected type).

Naming Consistency5/5

All tools follow the 'lean_' prefix with descriptive snake_case names. The pattern is uniformly applied: verb_noun (e.g., run_code, get_widgets) or noun_phrase (e.g., file_outline, goal). Minor naming variations (lean_leanfinder, lean_leansearch) are still consistent with the overall scheme.

Tool Count4/5

23 tools is slightly above the typical range but justified by the complexity of the Lean theorem prover domain. Each tool serves a specific need (building, tactics, searching, diagnostics), and none are redundant. The count feels complete without being overwhelming.

Completeness5/5

The tool set covers the full lifecycle of Lean development: building, writing (completions, code actions), information (hover, declaration, references, diagnostics), proving (goals, term goals, multi_attempt, hammer), searching (four distinct search tools), verification, profiling, and analysis (minimal hypotheses). No obvious gaps for an LSP interface.

Maintenance

ActivityActive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Exposes TypeScript Language Server Protocol functionality to AI agents, enabling them to query types at specific positions, find definitions and references, get diagnostics, run type tests, and type-check inline code just like in an IDE.
    9
    146
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI agents with language-aware code analysis through the Language Server Protocol, enabling tasks like getting code insights and diagnostics.
    16
    191
    MIT

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/oOo0oOo/lean-lsp-mcp'

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