Skip to main content
Glama

github.repo_file

Retrieve file contents from a GitHub repository by specifying owner/repo and file path, with optional branch, tag, or commit ref. Useful for reading source code or configs.

Instructions

Get file content from a GitHub repo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag, or commit SHA
pathYesFile path within repo
repoYesowner/repo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden but only says it retrieves content. It omits whether auth is required, whether it works on private repos, how binary/large files are handled, and encoding or truncation behavior — meaningful gaps for a file-fetch tool.

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?

A single front-loaded sentence with no waste. It is efficient, though its brevity borders on under-specification given the missing behavioral and usage detail.

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

Completeness2/5

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

With no annotations and no output schema, the description is the only place behavioral context could live, yet it provides essentially none. For a read tool with three parameters and a rich sibling set, more detail about return format and behavior would be expected.

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 100% (repo='owner/repo', path='File path within repo', ref='Branch, tag, or commit SHA'), so the schema already documents all three parameters. The description adds no further meaning, which is the baseline expectation when coverage is complete.

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?

States a specific verb (Get) and resource (file content) scoped to a GitHub repo, which is clear and actionable. However, it does not differentiate itself from siblings like github.repo_tree or github.repo_overview, leaving the agent to infer that this fetches contents rather than metadata or listings.

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 guidance on when to use this tool versus github.repo_tree (to list files) or github.search_code (to find content). No prerequisites or conditions are stated, so selection among the tight github sibling set is left entirely to inference.

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