Skip to main content
Glama
redf0x1

MCP-Server-Filesystem

by redf0x1

read_file

Read file contents from the filesystem to examine a single file. Supports reading just the first or last lines with head/tail parameters.

Instructions

Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Use the 'head' parameter to read only the first N lines of a file, or the 'tail' parameter to read only the last N lines of a file. Only works within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headNoIf provided, returns only the first N lines of the file
pathYes
tailNoIf provided, returns only the last N lines of the file
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 mentions handling various text encodings, detailed error messages for unreadable files, and the restriction to allowed directories. This adds useful context beyond the schema, though it doesn't detail return format or size limits.

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 three sentences, front-loaded with the core purpose, then adding behavioral nuances and parameter usage. Every sentence earns its place with no fluff.

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 no annotations and no output schema, the description covers the essential context: purpose, usage, head/tail semantics, and directory constraints. It could explain the return format or maximum file size, but for a simple read tool, it is sufficiently complete.

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 coverage is 67% (head and tail have descriptions), and the description repeats their purpose without adding new syntax or format details. The path parameter has no schema description, and the description only implies it via 'file from the file system', not adding explicit meaning. Overall, the description adds marginal value over 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 explicitly states the tool reads the complete contents of a file, which is a specific verb+resource. It distinguishes itself from siblings by noting 'single file' and mentions head/tail for partial reads, making its purpose clear and unique.

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?

It provides clear guidance on when to use the tool ('when you need to examine the contents of a single file') and how to use head/tail parameters. It doesn't explicitly mention alternatives like read_multiple_files, but the 'single file' qualifier implies the distinction, which is adequate.

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/redf0x1/MCP-Server-Filesystem'

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