Skip to main content
Glama

lean_diagnostic_messages

Retrieve all diagnostic messages (errors, warnings, infos) from a Lean file to identify and resolve code issues.

Instructions

Get all diagnostic msgs (errors, warnings, infos) for a Lean file.

"no goals to be solved" means code may need removal.

Args:
    file_path (str): Abs path to Lean file

Returns:
    List[str] | str: Diagnostic msgs or error msg

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does add useful context, such as interpreting 'no goals to be solved' as a sign that code may need removal, and it specifies the return type (List[str] or str). However, it does not disclose whether the tool runs Lean on the file, requires the file to exist, or has any side effects. It is reasonably transparent but leaves some behavioral gaps.

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 and well-structured. It front-loads the main purpose in the first sentence, includes a single clarifying note, and then provides clean Args and Returns sections. Every sentence earns its place with no redundancy or filler.

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?

For a simple one-parameter tool with an output schema, the description is fairly complete. It covers the purpose, parameter meaning, and return type, and adds an interpretive note. The only minor gap is that it does not explain when a string error message is returned versus a list of diagnostics, but the output schema likely covers that (and the description does mention 'or error msg').

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?

The input schema only defines 'file_path' as a string with no description. The tool description adds critical semantic value by specifying 'Abs path to Lean file', clarifying that the path must be absolute. This fully compensates for the 0% schema description coverage for the single parameter.

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 function: 'Get all diagnostic msgs (errors, warnings, infos) for a Lean file.' This is a specific verb+resource combination that distinguishes it from sibling tools like lean_goal or lean_file_contents. The added note about 'no goals to be solved' further clarifies the purpose by explaining a common diagnostic outcome.

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 usage context by describing what the tool returns, but it does not explicitly state when to use this tool versus alternatives (e.g., 'use this to debug compilation errors'). There is no mention of when not to use it or which sibling tools might be preferred. The usage is inferred from the purpose, but explicit guidance is missing.

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