Skip to main content
Glama

lean_goal

Read-onlyIdempotent

Get proof goals at a line in a Lean file; omit column to view goals before and after a tactic, showing proof state transformations.

Instructions

Get proof goals at a position. MOST IMPORTANT tool - use often!

Omit column to see goals_before (line start) and goals_after (line end),
showing how the tactic transforms the state. "no goals" = proof complete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYesLine number (1-indexed)
columnNoColumn (1-indexed). Omit for before/after
file_pathYesAbsolute or project-root-relative path to Lean file

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalsNoGoal list at specified column position
goals_afterNoGoals at line end (when column omitted)
goals_beforeNoGoals at line start (when column omitted)
line_contextYesSource line where goals were queried
Behavior4/5

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

Annotations already indicate readOnlyHint and idempotentHint. The description adds behavioral context: how omitting column affects output and what 'no goals' means. No contradiction with annotations.

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?

Short and to the point. The first sentence captures purpose, second adds usage nuance. The 'MOST IMPORTANT' emphasis is slightly subjective but not detrimental. Well-structured.

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?

Given the tool's interactive nature, the description covers core functionality and key behavior. Output schema likely handles return values. Could mention error conditions, but not required for completeness.

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?

Input schema has 100% coverage with descriptions. The description adds value by explaining the effect of omitting the column parameter, going beyond schema descriptions.

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?

Clearly states it retrieves proof goals at a position. The phrase 'MOST IMPORTANT tool' emphasizes its role. Distinguishes from siblings like lean_term_goal by focusing on proof state transformation.

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?

Provides clear guidance on omitting column to see before/after goals and interprets 'no goals' as proof complete. Could be more explicit about when to use this over sibling tools like lean_term_goal, but context is sufficient.

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