Skip to main content
Glama

lean_goal

Retrieve proof goals at a specific line in a Lean file to understand the current proof state and its evolution.

Instructions

Get the proof goals (proof state) at a specific location in a Lean file.

VERY USEFUL! Main tool to understand the proof state and its evolution!
Returns "no goals" if solved.
To see the goal at sorry, use the cursor before the "s".
Avoid giving a column if unsure-default behavior works well.

Args:
    file_path (str): Abs path to Lean file
    line (int): Line number (1-indexed)
    column (int, optional): Column number (1-indexed). Defaults to None => Both before and after the line.

Returns:
    str: Goal(s) or error msg

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYes
columnNo
file_pathYes

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 behavioral disclosure. It discloses the 'no goals' return, default column behavior, and how to target 'sorry'. This is solid transparency, though it does not explicitly state read-only safety.

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 well-structured with args and returns sections, but the 'VERY USEFUL!' exclamation is unnecessary. Most sentences provide value, though the editorializing could be trimmed.

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?

Despite no annotations, the description covers purpose, parameters, return behavior, and a nuanced column tip. Given the tool's simplicity and the presence of an output schema, it is sufficiently complete.

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?

The schema has zero description coverage, but the description fully explains every parameter: absolute file path, 1-indexed line, and optional column with clear default behavior. This exceeds the schema's bare structure.

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 gets proof goals at a specific location in a Lean file, using a specific verb and resource. It does not explicitly differentiate from siblings like lean_term_goal, so it falls short of a 5.

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 for when to use the tool ('main tool to understand the proof state') and gives practical guidance on column usage. It does not explicitly mention alternatives or when not to use it, so it misses the top score.

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