Skip to main content
Glama

Read a file

files_read
Read-onlyIdempotent

Read a file, or a slice of it. Use offset/limit to page through a long file.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>",
      "path": "<path>"
    },
    "name": "files_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
pathYes
limitNoHow many lines. Default 400.
offsetNoFirst line to return, 0-based.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds only the paging behavior — nothing about what is returned (raw content? line array?), encoding/binary handling, or error behavior for a nonexistent path.

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?

Two short sentences, front-loaded with the core action, and both sentences earn their place by adding purpose then paging guidance. It is efficient to the point of being sparse, but there is no filler or redundancy to cut.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with no output schema, the description should at least hint at the return shape (file contents vs. a list of lines, truncation behavior at the 2000-line cap) and clarify the required 'id'. With annotations covering safety and the schema covering half the parameters, it is minimally adequate but leaves the agent guessing about output format.

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 50%: limit and offset are documented in the schema, while the required 'id' and 'path' have no descriptions anywhere. The description usefully explains how offset and limit combine for paging, but leaves the required 'id' parameter (presumably a drive/workspace identifier) completely unexplained, which is a meaningful gap for a mandatory argument.

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?

States a specific verb and resource ('Read a file, or a slice of it'), and the singular framing implicitly separates it from files_readMany. It does not explicitly name or contrast with siblings like files_search, files_outline, or files_readMany, so it falls short of full sibling differentiation.

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?

The second sentence gives concrete guidance for paging ('Use offset/limit to page through a long file'), which is real usage advice. However, there is no guidance on when to choose this over files_readMany, files_outline, or files_search, and no note on what to do if the file is missing or binary.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources