Skip to main content
Glama

lean_hammer_premise

Identify relevant premises from a Lean proof state. Provide file path, line, and column to search for useful lemmas to advance your proof.

Instructions

Limit: 3req/30s. Search for premises based on proof state using the lean hammer premise search.

Args:
    file_path (str): Abs path to Lean file
    line (int): Line number (1-indexed)
    column (int): Column number (1-indexed)
    num_results (int, optional): Max results. Defaults to 32.

Returns:
    List[str] | str: List of relevant premises or error message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYes
columnYes
file_pathYes
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. It discloses the rate limit (3req/30s), input requirements, and return type/error behavior ('List[str] | str: List of relevant premises or error message'). This is useful behavioral context beyond what the schema provides, though it does not explicitly state side-effect-free behavior or prerequisites.

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: a rate limit note, a one-sentence purpose, a clear args list, and a return type. Every sentence provides necessary information without redundancy or fluff, making it appropriately sized for the tool's complexity.

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?

The description covers all parameters, return values, and rate limits. The optional output schema is described via the Returns line, so no additional return-value explanation is needed. However, it lacks explicit error scenarios beyond 'error message' and does not mention any project or file prerequisites, leaving minor gaps for a search tool.

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 coverage is 0%, so the description must compensate. It provides detailed explanations for all parameters: 'file_path' as absolute path, 'line' and 'column' as 1-indexed positions, and 'num_results' with default value 32. This adds significant meaning beyond the raw 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's purpose: 'Search for premises based on proof state using the lean hammer premise search.' This uses a specific verb ('Search') and resource ('premises based on proof state'), and the mechanism ('hammer premise search') distinguishes it from sibling search tools like lean_local_search or lean_loogle.

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 when to use the tool (when you need premises for a proof state at a given location) but does not explicitly explain when to prefer it over alternatives or provide exclusion criteria. The rate limit ('Limit: 3req/30s') is a usage constraint but not a comparison to sibling tools.

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