Skip to main content
Glama

lean_loogle

Search for Lean definitions and theorems via loogle using patterns like constants, lemma names, subexpressions, type shapes, and conclusions.

Instructions

Limit: 3req/30s. Search for definitions and theorems using loogle.

Query patterns:
  - By constant: Real.sin  # finds lemmas mentioning Real.sin
  - By lemma name: "differ"  # finds lemmas with "differ" in the name
  - By subexpression: _ * (_ ^ _)  # finds lemmas with a product and power
  - Non-linear: Real.sqrt ?a * Real.sqrt ?a
  - By type shape: (?a -> ?b) -> List ?a -> List ?b
  - By conclusion: |- tsum _ = _ * tsum _
  - By conclusion w/hyps: |- _ < _ → tsum _ < tsum _

Args:
    query (str): Search query
    num_results (int, optional): Max results. Defaults to 8.

Returns:
    List[dict] | str: Search results or error msg

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
num_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden of disclosing behavior. It mentions a rate limit ('3req/30s') and the return type ('List[dict] | str'), which are useful operational details. It does not explicitly state it is read-only, but the search nature makes that obvious. It could elaborate on error behavior, but the provided information is solid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a leading purpose, then query patterns, args, and returns. Every sentence adds value, and the length is justified by the complexity of the query syntax. It is front-loaded with the key information (limit and 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?

The tool is complex due to its flexible query language, and the description covers all essential aspects: purpose, rate limit, query patterns, argument semantics, and return type. The presence of an output schema covers the detailed return structure, so the high-level return description is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does so extensively by providing seven query patterns that describe the expected format for the query parameter, plus a clear explanation for num_results. This goes far beyond the bare schema and gives the agent a strong understanding of how to construct valid queries.

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 for definitions and theorems using loogle.' This is a specific verb+resource combination that distinguishes it from sibling search tools like lean_local_search or lean_leandex. The query patterns further reinforce what the tool is for.

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 clear context on how to use the tool with detailed query patterns and argument explanations. However, it does not explicitly mention when not to use this tool or compare it to alternatives, so it falls short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

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

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

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