Skip to main content
Glama
Repo Insight MCP

Repo Insight MCP

by viradm

read_file

Reads a single text file from a GitHub repository, truncating content at a specified byte limit and reporting truncation instead of returning oversized data.

Instructions

Read one text file. Truncates at max_bytes and says so, rather than returning a file too large to be useful.

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": {
      "repo": "<repo>",
      "path": "<path>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNobranch, tag or commit SHA
pathYespath within the repository
repoYesowner/name or a github.com URL
max_bytesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description carries the whole burden and it does disclose one genuinely useful behavior: output is truncated at max_bytes and the truncation is reported rather than silently returning a huge file. It does not say what happens with binary or non-text files, or whether a missing path errors versus returns empty.

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?

Two short sentences, front-loaded with what the tool does, then the truncation caveat. The trailing clause "rather than returning a file too large to be useful" is mild restatement of the same point and could be dropped without loss.

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?

An output schema exists, so return shape need not be explained, and 4 parameters at 75% coverage are mostly covered by the schema. Still missing for a file-read tool is any statement about error behavior on missing paths, non-text files, or what ref="" (default) resolves to.

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 description coverage is 75%, and the schema already documents repo, path, and ref, so the description need only reinforce. It mentions max_bytes by name and clarifies that the limit truncates rather than fails, which is a small but real addition over the schema's numeric bounds.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Read one text file" states a specific verb (read) and resource (a single file) and adds the scoping word "one", which implicitly separates it from directory-listing or code-search siblings. It stops short of naming any alternative, so it is clear but not differentiating by explicit contrast.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance: nothing says to prefer file_history for past versions, list_tree for discovery, or search_code when the path is unknown. The only usage-adjacent information is the truncation behavior, which is about output, not about selecting the tool.

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