Skip to main content
Glama
j0hanz

filesystem-mcp

by j0hanz

Read File

read
Read-only

Retrieve text file contents from the local filesystem, with options to read the first or last lines, specify a line range, or process multiple files in one batch.

Instructions

Read one or more text files and return content. Partial reads: head (first N lines), tail (last N lines), startLine/endLine (line range). Batch mode: pass paths[] instead of path; line params are shared across all files. head, tail, and startLine/endLine are mutually exclusive — use exactly one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headNoReturn first N lines
pathNoSingle file path; mutually exclusive with paths
tailNoReturn last N lines
pathsNoArray of file paths for batch mode (max 1000); mutually exclusive with path
endLineNoEnd line (1-indexed)
startLineNoStart line (1-indexed)
includeHashNoInclude SHA-256 hash of the returned content in the response

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYesPer-path results ordered to match the input paths
summaryYes
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already carry read-only and closed-world hints; the description adds valuable behavioral details on partial reads, batch-mode parameter sharing, and mutual exclusivity of head/tail/line-range options. It does not cover edge cases like missing files or directory input, but the core behavior is transparent.

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?

Three sentences with zero fluff. The action is front-loaded, partial-read modes are listed compactly, and the batch-mode rule and mutual-exclusivity constraint are stated in a single final sentence. Every sentence earns its place.

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 tool with a rich schema, read-only annotations, and an output schema, the description is nearly complete: it covers modes, parameter sharing, and exclusivity. It omits only minor edge-case behavior such as missing-file or directory-handling semantics, which are not critical for correct invocation.

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?

All 7 parameters are documented in the schema (100% coverage), so the baseline is 3. The description adds semantics beyond the schema: line parameters are shared across files in batch mode, and head/tail/startLine-endLine are mutually exclusive. That grouping and relationship information justifies a 4.

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?

States a precise verb+resource ('Read one or more text files and return content') that unambiguously separates it from sibling tools like list, stat, and search_text. The action is inherently distinct, so no explicit sibling naming is needed.

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 first sentence establishes the core use case (reading text file content), and the description gives clear context for partial reads and batch mode. However, it does not explicitly contrast with sibling tools or state when not to use read, so no exclusions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/j0hanz/filesystem-mcp'

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