Skip to main content
Glama

Read Multiple Files

read_multiple_files
Read-onlyIdempotent

Read multiple files at once to analyze or compare their contents in a single call. Returns each file's text with its path; failed reads don't stop the rest.

Instructions

Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories.

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

Input Schema

NameRequiredDescriptionDefault
pathsYesArray of file paths to read. Each path must be a string pointing to a valid file within allowed directories.

Output Schema

NameRequiredDescriptionDefault
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this as a safe, idempotent read, so the description's main contribution is partial-failure semantics: 'Failed reads for individual files won't stop the entire operation.' That is genuinely useful behavior an agent could not infer from the schema, plus the allowed-directory restriction. It does not describe result ordering or size limits, so not 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?

Four short sentences, front-loaded with the core action, then efficiency rationale, then return shape, then failure behavior. Every sentence carries distinct information with no repetition of the title.

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 the return format needn't be spelled out, and annotations cover the safety profile; the description still adds the failure-tolerance and directory-scope facts an agent needs. Only minor gaps remain, such as whether results are ordered or truncated for very large batches.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single 'paths' array is fully documented in the schema itself, so the baseline is 3. The description contributes only the constraint that paths must be 'within allowed directories,' which adds marginal meaning but no new syntax or format detail.

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 ('Read the contents of multiple files') and contrasts its scope with reading 'files one by one,' implicitly routing batch work here rather than to read_file. An agent can distinguish it from single-file siblings 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?

Gives a clear when-to-use condition ('when you need to analyze or compare multiple files') and an efficiency rationale versus sequential reads. It stops short of explicit exclusions such as when a single file or media file should be read instead, so it is strong but not complete routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.