Skip to main content
Glama

Read multiple files from a deployed site in one call

read_files
Read-onlyIdempotent

Batched version of read_file. Pass up to 50 paths; each is fetched independently with the same per-file rules as read_file. The whole batch is capped at 8388608 bytes total — once that's exhausted, remaining paths fail with BATCH_BUDGET_EXCEEDED so the agent can re-request them in another call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
pathsYesSite-relative paths to read (1..50). Order is preserved in the response.
siteIdNo
maxBytesPerFileNoPer-file cap. Default 1048576, hard max 5242880.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
filesYesOne entry per requested path, in the same order. Each entry is independent: a missing file or oversized file fails its own entry but does not abort the whole batch. If the cumulative byte budget is exhausted partway through, remaining entries fail with code BATCH_BUDGET_EXCEEDED.
siteIdYes
totalBytesYesSum of bytes returned across successful entries.
budgetExceededAtYesIndex of the first path that was skipped due to the cumulative byte budget, or null if everything fit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / properties / request_id
      Removed value: -{
      -  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      -  "type": "string"
      -}
  2. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the tool is clearly safe. The description goes beyond annotations by disclosing the batch budget cap of 8388608 bytes and the exact failure mode BATCH_BUDGET_EXCEEDED, including how remaining paths behave. It doesn't explain response ordering in prose, but the schema note already covers that.

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 no redundancy: batch nature, per-file rules, and batch budget behavior are all covered compactly. The most decision-relevant fact (batched version of read_file) is front-loaded in the first sentence.

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 batch-read tool with readOnly/idempotent annotations and an output schema, the description covers the key operational constraints: size limit, per-file independence, and failure behavior. The only minor gap is not naming the required siteId parameter explicitly, but the title and read_file reference sufficiently anchor the context.

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?

With 50% schema description coverage, the schema already documents paths and maxBytesPerFile, while name and siteId are only typed fields. The description adds that paths are fetched independently with the same per-file rules as read_file, which gives meaning beyond the raw schema. It doesn't explain name/siteId semantics, but those are inferable from the tool title and the same-rule pointer.

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 clearly states the tool is the batched version of read_file, specifying the resource (multiple files from a deployed site) and the verb (read). The sibling list contains read_file, so naming it as the batched variant distinguishes it from the single-file tool and other read-related siblings like read_source_files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says it is the batched version of read_file and that each file follows the same per-file rules as read_file, so an agent knows to use this when multiple paths need reading and read_file for a single path. It also gives an explicit error-based retry strategy for the batch budget, telling the agent to re-request remaining paths in another call.

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.