Skip to main content
Glama

Read Multiple Files

read_multiple_files
Read-only

Read several files together to analyze or compare their contents; each result includes its path, and a failed read does not 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.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuine behavioral context beyond that: per-file failure isolation ('won't stop the entire operation') and the allowed-directory constraint, both of which an agent needs to interpret partial results correctly.

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?

Four short sentences, purpose front-loaded, no filler. The sentence about content being returned with its path slightly duplicates what the output schema already conveys, but it is brief and harmless.

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?

For a one-parameter batch read with annotations covering safety and an output schema covering returns, the description covers everything an agent needs: batching rationale, permission boundary, and partial-failure behavior. Nothing material is missing.

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% on the single 'paths' parameter, so the schema already carries the semantics (array of strings, minItems 1, must be inside allowed directories). The description adds only the 'allowed directories' reminder, which is already in the schema, so baseline 3 applies.

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 (read) and resource (contents of multiple files) with explicit scope. The plurality plus 'more efficient than reading files one by one' signals how it differs from the single-file siblings like read_file/read_text_file without needing the 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 condition for use ('when you need to analyze or compare multiple files') and contrasts it with sequential reads. It does not, however, name read_file/read_text_file as the alternatives for the single-file case, so the routing is implied rather than explicit.

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