Skip to main content
Glama
JEL-LL

file_utils MCP

by JEL-LL

read_file_range

Read a targeted range from a file by line numbers or content anchors, streaming large files and returning a content hash to keep edits safe.

Instructions

Read a contiguous span of a file, addressed by anchors (primary) or line numbers (fallback). Streams large files and returns a content_hash for staleness-guarded edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or workspace-relative path to the file.
to_lineNo1-based end line, inclusive. Supports negative indexing. Mutually exclusive with to_anchor.
encodingNoFile encoding. Default: utf-8. Pass utf-8-sig to strip a BOM.utf-8
from_lineNo1-based start line. Supports negative indexing (-1 = last line). Mutually exclusive with from_anchor.
to_anchorNoStop at the matching line after the start (inclusive). Mutually exclusive with to_line.
from_anchorNoStart at the matching line (inclusive, substring, case-sensitive). Mutually exclusive with from_line.
project_rootNoSets (and remembers) the project root for resolving relative paths for this and subsequent calls in the session.
to_anchor_totalNoExpected total occurrences of to_anchor after the start. Optional: if omitted, the ambiguity guard is skipped and the to_anchor_occurrence-th match after the start is selected. Supply a value to re-enable the guard (ANCHOR_AMBIGUOUS on mismatch).
max_output_charsNoMaximum number of characters of content to return. If the resolved span exceeds this budget, OUTPUT_TOO_LARGE is returned (reporting the actual size) instead of a truncated body.
from_anchor_totalNoExpected total occurrences of from_anchor in the file.
to_anchor_occurrenceNoWhich occurrence of to_anchor (after the start) to use.
from_anchor_occurrenceNoWhich occurrence of from_anchor to use (1-based).
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 adds two non-obvious behavioral traits: streaming for large files and the return of a content_hash for staleness-guarded edits. It does not mention error behaviors like OUTPUT_TOO_LARGE, but those are already documented in the input schema, so the description adds valuable context without repeating schema.

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 two sentences long, with the core function stated first and supporting behaviors second. Every phrase adds value: the addressing modes, streaming, and hash for edits. There is no redundancy or filler, making it highly efficient.

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 complex with 12 parameters and no output schema, yet the description combines with the rich schema descriptions to provide adequate context. It highlights key aspects (anchors vs lines, streaming, hash) that are not fully captured in the schema. It does not describe the exact return structure, but for a read operation that is implied. Slightly incomplete, but strong overall.

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 schema provides 100% parameter coverage, so the baseline is 3. The description adds meaningful semantics by defining the precedence of anchors over line numbers, which helps disambiguate mutually exclusive parameter groups. It also clarifies that the tool reads a contiguous span, giving context to from/to parameters. This 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?

The description opens with 'Read a contiguous span of a file,' a specific verb+resource combination that clearly states the tool's function. It also distinguishes between anchor-based and line-based addressing, and the read-only nature is obvious from the verb 'Read' contrasted with sibling mutation tools like edit_file_range and insert_at.

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 context for when to use the tool: reading a span in preparation for edits, as indicated by 'returns a content_hash for staleness-guarded edits' and 'Streams large files.' It also instructs that anchors are the primary addressing method with line numbers as fallback. It does not explicitly name alternatives or exclusions, but the use case is clear.

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/JEL-LL/file_utils'

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