Skip to main content
Glama

Search Lean 4.33.1 Formalized Theorems

search_lean_theorems
Read-onlyIdempotent

Search public Lean 4 theorems by keyword, theorem name, or module to retrieve exact file paths, line numbers, signatures, and verification metadata for formalization work.

Instructions

Search all 107 public Lean 4.33.1 theorems across the 9 standalone formalization modules with exact file paths, line numbers, signatures, and 0-sorry / standard-axioms verification metadata.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_lean_theorems"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesKeyword, theorem name, or mathematical term (empty string lists theorems, optionally filtered by module).
moduleNoOptional module name or preprint slug filter (e.g. 'Erdos128Witness', 'AlanLewConj15', 'TammesExactCerts', '2027-05-borsuk-distlap-polytopes').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world, non-destructive behavior, so the safety profile is covered. The description adds real value beyond that by disclosing the result payload (file paths, line numbers, signatures) and, notably, that results carry '0-sorry / standard-axioms verification metadata' — a domain-specific signal an agent would not otherwise know.

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?

A single front-loaded sentence with no filler; the verb and scope come first and the returned fields and verification metadata follow. It is dense but every clause carries information, so nothing reads as padding.

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 annotations handling safety, full schema coverage, and only two parameters, most of the burden is already carried by structured fields. The description fills the main remaining gap by describing result contents and verification metadata; only pagination or result-size expectations are left unaddressed.

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 both 'query' and 'module' are fully documented in the schema, and the baseline of 3 applies. The description's mention of the '9 standalone formalization modules' loosely contextualizes the module filter but adds no syntax or semantics 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 names a specific verb ('Search') and resource ('Lean 4.33.1 theorems'), and bounds the scope to '107 public theorems across 9 standalone formalization modules'. That is enough to separate it from search_papers, get_paper, or get_bibtex, though it never explicitly contrasts itself with those siblings.

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

Usage Guidelines2/5

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

There is no when-to-use, when-not-to-use, or alternative-tool guidance anywhere in the description. That an empty query lists theorems is stated only in the schema, not the description. The agent must infer that this is the theorem-lookup tool rather than one of the paper tools.

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