Skip to main content
Glama

Read multiple files from a deployed site in one call

read_files
Read-onlyIdempotent

Read up to 50 served files in one call, with the same per-file rules as read_file and 8388608 bytes in total; paths past the budget fail with BATCH_BUDGET_EXCEEDED, so request them again in another call. Use read_source_files instead for the editable source tree.

Input Schema

NameRequiredDescriptionDefault
nameNoSite name as shown by list_sites, e.g. my-portfolio. Provide name or siteId.
pathsYesSite-relative paths to read (1..50). Order is preserved in the response.
siteIdNoSite id from list_sites or get_site. Use instead of name.
maxBytesPerFileNoPer-file size cap in bytes. Default 1048576, max 5242880.

Output Schema

NameRequiredDescriptionDefault
nameYes
filesYesOne entry per requested path, in order. A missing or oversized file fails only its own entry; entries past the byte budget fail with 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. Changed4 schema fields changed
    • changedInput schema / properties / maxBytesPerFile / description
      Previous value: -"Per-file cap. Default 1048576, hard max 5242880."New value: +"Per-file size cap in bytes. Default 1048576, max 5242880."
    • addedInput schema / properties / name / description
      Added value: +"Site name as shown by list_sites, e.g. my-portfolio. Provide name or siteId."
    • addedInput schema / properties / siteId / description
      Added value: +"Site id from list_sites or get_site. Use instead of name."
    • changedOutput schema / properties / files / description
      Previous value: -"One 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."New value: +"One entry per requested path, in order. A missing or oversized file fails only its own entry; entries past the byte budget fail with BATCH_BUDGET_EXCEEDED."
  2. Changed1 schema field changed
    • removedOutput schema / properties / request_id
      Removed value: -{
      -  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, idempotentHint, destructiveHint=false), but the description adds context they cannot express: the 8 MiB aggregate batch budget, the 50-file ceiling, and the concrete BATCH_BUDGET_EXCEEDED error plus remediation. It stops short of mentioning permissions/auth requirements, so it is not exhaustive.

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?

Two sentences, no filler, and the most important constraint (batch size and total budget) is front-loaded before the routing pointer. The raw byte count is precise rather than padded.

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?

An output schema exists, so return format need not be explained. Between the batching limits, the error contract, and the sibling routing, an agent has everything required to call this correctly on the first attempt.

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 description coverage is 100%, so the baseline is 3, but the description adds the aggregate byte budget that governs how the four parameters interact (per-file caps plus a total cap that the schema does not show). It also ties behavior back to read_file's per-file rules, which is meaning beyond the schema.

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 specific verb and resource with explicit scope: 'Read up to 50 served files in one call.' The word 'served' plus the pointer to read_source_files cleanly separates it from the source-tree readers and from single-file read_file, so an agent can pick it without opening a schema.

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?

Gives an explicit alternative and the condition that selects it ('Use read_source_files instead for the editable source tree'), and adds a failure-recovery rule: paths past the budget fail with BATCH_BUDGET_EXCEEDED and should be re-requested in a separate call. Both when-to-use and what-to-do-on-failure are covered.

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.