Skip to main content
Glama

Read multiple source files in one call

read_source_files
Read-onlyIdempotent

Read up to 50 files from the editable source tree in one call (8388608 bytes in total). Each path succeeds or fails on its own; paths past the budget fail with BATCH_BUDGET_EXCEEDED. Use read_source_files for source; use read_files instead for the files the site serves.

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_source_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoSite name as shown by list_sites, e.g. my-portfolio. Provide name or siteId.
pathsYesPaths inside the source tree, e.g. 'src/App.tsx' (1 to 50). Results keep this order.
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
filesYes
siteIdYes
totalBytesYes
budgetExceededAtYes

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
    • addedInput schema / properties / maxBytesPerFile / description
      Added 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 / paths / description
      Added value: +"Paths inside the source tree, e.g. 'src/App.tsx' (1 to 50). Results keep this order."
    • addedInput schema / properties / siteId / description
      Added value: +"Site id from list_sites or get_site. Use instead of name."
  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.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds genuinely new behavior: per-path independent success/failure and the BATCH_BUDGET_EXCEEDED error for paths past the aggregate byte budget. It does not say how nonexistent paths or files exceeding maxBytesPerFile are reported, which keeps it from a 5.

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 zero filler: capability and limits first, failure semantics second, sibling routing last. The front-loading lets an agent decide on invocation before reading details.

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?

With an output schema present, return values need no explanation, and the batching/budget behavior plus site selection are covered by schema. The remaining gap is the interaction between the total budget and the per-file cap (e.g. whether a too-large file is skipped or errors), which an agent might need to call 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 description coverage is 100%, so the baseline is 3 and the per-parameter docs already carry maxItems, ordering, and maxBytesPerFile. The description adds one constraint the schema does not express — the 8388608-byte total budget across all paths — which materially shapes how the paths array should be filled.

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 gives a specific verb and resource ('Read ... files from the editable source tree') plus concrete scope limits (up to 50 files, 8388608 bytes total). It also contrasts itself with the sibling read_files, so an agent can distinguish the two without opening either 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?

It states an explicit routing rule: 'Use read_source_files for source; use read_files instead for the files the site serves.' That is a clear when-to-use plus a named alternative with the condition that selects 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.