Skip to main content
Glama

Read several files

fs_read_many
Read-onlyIdempotent

Use this when the user wants several text files of an approved project read at once. Returns each file's first lines in the order asked, or an error code for that file; files[i] answers paths[i]. Read-only. Needs the sessionId from execution_session_open and a new operationId; each call is metered as one execution. A short result is returned inline within about two seconds; otherwise keep the returned IDs for operation_status and operation_output and do not resend the call.

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": {
      "sessionId": "<sessionId>",
      "operationId": "<operationId>",
      "paths": "<paths>"
    },
    "name": "fs_read_many"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsYes1-32 file paths relative to the selected project root (or the workspace root)
sessionIdYesexecutionSessionId returned by execution_session_open
deadlineAtNoOptional UTC admission deadline at most 60 seconds ahead (queue start timeout, NOT process execution lifetime)
operationIdYesA new random UUID v4 for this call; reuse it only to retry this same call
idempotencyKeyNoOptional retry key, 8-128 chars of [A-Za-z0-9._:-]; defaults to operationId
maxLinesPerFileNoLines returned per file from the start, 1-2000 (default 500); continue a longer file with fs_read
efficiencyProfileNoOptional, unverified label of the client's model, recorded as display metadata in the device owner's local activity statistics. Omit when unknown. Never send credentials or conversation content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds substantial behavior on top: per-file result shape with files[i] answering paths[i], per-file error codes, an inline-versus-async latency threshold of about two seconds, and the fact that each call is metered as one execution. The 'do not resend' instruction is exactly the operational detail an agent cannot derive from structured fields.

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?

Four dense sentences, each doing distinct work: when to use, what comes back, the read-only and prerequisite constraints, then the inline-versus-async handling rule. The most consequential operational fact — do not resend — is placed last but is unmissable, and there is no filler.

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?

With no output schema, the description carries the return-value burden and does so: first lines per file, ordered results, per-file error codes, and the fallback to operation_status/operation_output. For a 7-parameter nested-schema tool with an async escape hatch, an agent has everything needed to call it and handle both outcomes correctly.

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?

Schema coverage is 100%, so the baseline is 3, and the description earns one step above it by explaining the files[i]/paths[i] index correspondence, which the schema does not state. It also reinforces the sessionId provenance and the 'new operationId' requirement, though those repeat schema text rather than extend it.

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?

The description opens with a specific verb and resource — reading several text files of an approved project at once — plus the crucial scope word 'several', which implicitly separates it from the singular fs_read. It never names a sibling or states an explicit exclusion, so an agent must infer the batch-vs-single boundary rather than read it.

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 states the triggering user intent ('wants several text files of an approved project read at once') and the prerequisites (sessionId from execution_session_open, a fresh operationId), which is real when-to-use guidance. It also gives a recovery rule for slow calls — keep the IDs for operation_status/operation_output and do not resend — but never says when to prefer fs_read or another read sibling instead.

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.