Skip to main content
Glama

batch_read

Read multiple files under a token budget to seed cache for search and grep. Returns diffs for modified files, full content for new ones, and skips large files when budget exhausted.

Instructions

Read multiple files under a token budget.

Use to seed cache before search/grep; prefer over repeated read calls. Returns diffs for modified files, full content for new ones; large files skipped when budget exhausted (use read with offset/limit to recover).

Args: paths: Comma-separated paths, JSON array, or glob patterns. max_total_tokens: Token budget across the batch. priority: Optional paths to read first before the remaining files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes
max_total_tokensNo
priorityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
truncatedNo
summaryNo
skippedNo
filesNo
Behavior4/5

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

Discloses key behaviors: reads multiple files, returns diffs for modified and full for new, skips large files when budget exhausted, and priority handling. Missing details on error handling or non-existent files, but overall good for a read tool without annotations.

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?

Concise yet informative: two sentences of core description plus bulleted args. No wasted words or redundancy.

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?

Given the presence of an output schema (mentioned but not shown), the description covers usage, behavior, and parameters thoroughly. An agent has enough context to select and invoke the tool correctly.

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?

With 0% schema description coverage, the description fully compensates by explaining each parameter: paths accepts comma-separated, JSON array, or glob; max_total_tokens is the token budget; priority allows early reading. Adds meaning beyond the schema.

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 the tool reads multiple files under a token budget and differentiates from sibling tools like `read` (single file) and `search`/`grep`. It specifies the return format (diffs for modified, full for new) and the budget behavior.

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?

Explicitly advises using this tool before `search`/`grep` and over repeated `read` calls. It also tells when to fall back to `read` with offset/limit when budget is exhausted, covering both when to use and alternatives.

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/CoderDayton/semantic-cache-mcp'

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