Skip to main content
Glama

lean_loogle

Read-onlyIdempotent

Search the Mathlib library for theorems and definitions by type signature, constant name, or pattern.

Instructions

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

Examples: `Real.sin`, `"comm"`, `(?a → ?b) → List ?a → List ?b`,
`_ * (_ ^ _)`, `|- _ < _ → _ + 1 < _ + 1`

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesType pattern, constant, or name substring
num_resultsNoMax results

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNoList of Loogle results
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.

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

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