Skip to main content
Glama

multiread

Read multiple files in a single API call with automatic encoding detection. Supports per-file line offsets and limits, errors for failed files, and up to 50 files per request.

Instructions

Reads multiple files in a single call to reduce API round-trips. Encoding-aware: auto-detects file encoding for each file. Supports offset/limit for reading specific line ranges. Use file_paths or paths (string array) with global offset/limit, or files (object array) for per-file offset/limit. If a file fails, the error is included in output and remaining files continue. Maximum 50 files per request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathsNoList of absolute file paths to read. All files use the global offset/limit. Use 'files' instead for per-file ranges
pathsNoAlias for file_paths
offsetNoLine number to start reading from (1-based). Negative = from end (e.g. -5 = last 5 lines). Default: 1
limitNoMaximum number of lines to read per file. Default: 0 (all)
filesNoPer-file read ranges. Each entry has path, offset, limit. Takes priority over file_paths
Behavior4/5

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

With no annotations, the description carries full burden. It discloses encoding detection, offset/limit support, error handling (errors included, remaining files continue), and a 50-file limit. Missing explicit statement about read-only behavior.

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?

The description is concise with six sentences, front-loaded with the main purpose, and then provides essential details without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should mention the return format (e.g., array of objects with content/error). It only states 'error is included in output' but lacks structure details. Also omits permissions or limitations beyond the 50-file count.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant value by explaining the distinction between global parameters (file_paths/paths, offset, limit) and per-file parameters (files array), including priority and usage context beyond schema descriptions.

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 clearly states 'Reads multiple files in a single call' with a specific verb and resource. It distinguishes itself from the sibling 'read' tool by focusing on batch reads to reduce round-trips.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for reading multiple files and provides details like encoding detection and offset/limit, but does not explicitly state when to use this tool over alternatives like 'read' or 'grep'. No direct comparison or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/knewstimek/agent-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server