Skip to main content
Glama

lean_file_contents

Fetch the complete text of a Lean file, optionally with line numbers, to review source code or verify line references.

Instructions

DEPRECATED: Will be removed soon.

Get the text contents of a Lean file, optionally with line numbers.

Use sparingly (bloats context). Mainly when unsure about line numbers.

Args:
    file_path (str): Abs path to Lean file
    annotate_lines (bool, optional): Annotate lines with line numbers. Defaults to True.

Returns:
    str: File content or error msg

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
annotate_linesNo

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 transparency burden. It discloses the deprecation status, the context-bloating cost, the absolute path requirement, and that it returns an error message on failure. This provides meaningful behavioral context beyond the input schema.

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-organized with sections for deprecation, purpose, usage, arguments, and returns. It is slightly padded with indentation and blank lines, but each sentence provides necessary information.

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 tool is simple, and the description covers the key aspects: what it does, when to use it, parameters, return type, and deprecation. An output schema exists, so return value explanation is not strictly needed, but it is included. It could be slightly more complete by naming alternatives for when not to use it.

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 description coverage is 0%, so the description's Args block compensates by explaining file_path as an absolute path and annotate_lines as enabling line numbers with a default of True. It adds useful meaning beyond the bare schema property names.

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 the text contents of a Lean file with optional line annotation, which is specific and useful. However, it does not explicitly differentiate itself from sibling tools like lean_file_outline, though the phrase 'text contents' implies full raw content rather than structure.

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 gives clear situational guidance: 'Use sparingly (bloats context). Mainly when unsure about line numbers.' This tells an agent when to use the tool, though it does not explicitly mention when not to use it or reference alternatives.

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