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.

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": {
      "paths": "<paths>"
    },
    "name": "read_files"
  }
}

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. Changed2 schema fields changed
    • removedOutput schema / properties / budgetExceededAt / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / budgetExceededAt / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. 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."
  3. Changed1 schema field changed
    • removedOutput schema / properties / request_id
      Removed value: -{
      -  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      -  "type": "string"
      -}
  4. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (read-only, idempotent, non-destructive), and the description adds genuinely new behavior: a total batch budget of 8388608 bytes, the BATCH_BUDGET_EXCEEDED failure mode, and the retry strategy. It leaves the interaction between the total budget and the per-file maxBytesPerFile cap a bit unclear.

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 compact sentences, front-loaded with the capacity and scope, then the sibling routing. The raw byte count is less readable than a human-scaled figure, but nothing is redundant.

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?

Output schema and annotations are both rich, so the description only needs to supply budget semantics, failure mode, and sibling routing, and it does all three. The only gap is the unspecified relationship between the total budget and the per-file cap.

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 parameters are already documented; the description still adds the aggregate byte budget, which is not expressed anywhere in the schema, and its consequence for paths. That is real added meaning beyond the per-parameter definitions.

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 scope: 'Read up to 50 served files in one call'. It distinguishes itself from both read_file (same per-file rules, single file) and read_source_files (editable source tree), so an agent can pick it without opening any schema.

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?

Explicitly routes the agent away from this tool when the editable source tree is the target, and tells the agent what to do when the byte budget is exceeded (re-request in another call). It does not say when a single read_file call is preferable over a batch, but the batch framing implies it.

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.