Skip to main content
Glama

repo.read_file

Read repository files safely with enforced size limits and binary detection, giving AI agents controlled access to code.

Instructions

Read a file from the repository with size and binary guards

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to repo root
max_bytesNoMax bytes to read (default 1MB, cap 10MB)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the existence of 'size and binary guards', which is useful, but does not explain what happens when these guards are triggered (e.g., error, truncation, rejection). The description adds some behavioral context but lacks specificity.

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 a single concise sentence (10 words) that front-loads the verb and resource. It includes a valuable qualifier ('with size and binary guards') without being verbose. Every word earns its place.

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?

For a tool with 2 parameters, a fully documented schema, and no output schema, the description is adequate but incomplete. It does not describe the return format or behavior on guard violations, which the agent would need to know. The description covers the basic purpose but not the full context of use.

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?

The input schema already documents both parameters with descriptions (path, max_bytes with default and cap), so schema coverage is 100%. The description's wording 'size and binary guards' somewhat aligns with max_bytes and binary detection, but it does not add meaningful parameter-specific detail 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 states a clear verb ('Read'), a specific resource ('a file from the repository'), and additional scoping ('with size and binary guards'). This clearly distinguishes it from siblings like repo.search (searching) and repo.apply_patch (modifying).

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?

No explicit guidance on when to use this tool vs alternatives, but the purpose is self-evident from the description. Alternatives are not mentioned, and there are no exclusion criteria. Usage is implied rather than stated.

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/bgorzelic/ghostlink'

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