Skip to main content
Glama

github_mcp.read_files_batch

Read-only

Read 1–20 safe UTF-8 files from the same refreshed default-branch snapshot, returning content and checksums in one response. Use it to batch-fetch repository files within a 2 MB total limit.

Instructions

Read 1–20 safe UTF-8 files from the same refreshed default-branch snapshot. Returns a files array with content and checksums; total content is limited to 2 MB. Use read_file for job workspace or binary reads.

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": {
      "repository": "<repository>",
      "paths": "<paths>"
    },
    "name": "github_mcp.read_files_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsYesList of 1–20 repository-relative file paths.
repositoryYesAllowlisted owner/repo identifier.

Output Schema

NameRequiredDescriptionDefault
okYes
dataNo
messageNo
error_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.2
    • addedInput schema / properties / paths / description
      Added value: +"List of 1–20 repository-relative file paths."
    • addedInput schema / properties / repository / description
      Added value: +"Allowlisted owner/repo identifier."
  2. First observedv1.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description adds real context on top: all paths resolve against one refreshed default-branch snapshot, total content is capped at 2 MB, and the return is a files array with content plus checksums. It does not state failure semantics when one path in the batch is missing, oversized, or non-UTF-8, which is the main remaining behavioral gap for a batch tool.

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 short sentences, front-loaded with the operation and its scope, then the return/limit contract, then the routing alternative. No sentence is redundant and nothing is buried.

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 two-parameter batch read with an output schema, the description covers batch bounds, encoding constraint, snapshot consistency, payload cap, and the fallback tool. An agent has everything needed to call it correctly without consulting the schema.

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%, so both parameters are already documented, and the baseline is 3. The description adds modest meaning by implying that all paths must resolve within the same default-branch snapshot and that the repository must be allowlisted, but it offers no path syntax or edge-case guidance 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 opens with a specific verb and resource ('Read 1–20 safe UTF-8 files') plus a precise scope ('same refreshed default-branch snapshot'), which is far more than a restatement of the name. It also explicitly separates itself from the sibling read_file, so an agent can choose between them without inspecting 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 Guidelines4/5

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

It names the alternative (read_file) and the exact conditions that route there: job workspace reads and binary reads. What is left implicit is the positive case — that this tool should be preferred over N single read_file calls — though the '1–20' bound implies batching.

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