Skip to main content
Glama
Polarts

fs-mcp

by Polarts

Read file

read_file

Read a file's text content with optional line range. Returns line-numbered content and total line count.

Instructions

Read the text content of a file under the root. Optionally scope to a 1-indexed, inclusive line range via startLine/endLine. Returns the content with 1-indexed line numbers prefixed, plus the file's total line count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to root
endLineNo1-indexed end line, inclusive. Defaults to end of file
startLineNo1-indexed start line, inclusive. Defaults to 1
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 output format (line numbers prefixed, total line count), the inclusive nature of the line range, and the scoping to 'under the root.' This exceeds a minimal disclosure, though it omits details like encoding or error handling, which are not critical for this simple read operation.

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?

Two sentences, front-loaded with the core purpose and then the optional scoping and return format. Zero fluff, every sentence earns its place.

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?

For a simple read tool with no output schema, the description covers purpose, parameters, and return format (line numbers and total count), which is sufficient for an agent to invoke it correctly. It also notes the root constraint, covering the main operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description restates that startLine/endLine are 1-indexed and inclusive and mentions defaults, but these are already fully described in the schema. No additional meaning is added beyond the 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 states 'Read the text content of a file under the root' with a specific verb and resource, and clearly distinguishes from siblings like edit_file (modify), grep (search), and explore_filesystem (browse). It also specifies the optional line-range feature, making the purpose unambiguous.

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?

Usage is implied: it's for reading a file, and the line-range option is explained. However, there's no explicit guidance on when not to use it (e.g., for large files or searching) or any mention of alternatives like grep for content search or explore_filesystem for directory listing, leaving the distinction to the sibling list.

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/Polarts/fs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server