Skip to main content
Glama

get_file

Retrieve a file's content from a GitHub repository using the Contents API. Provide owner, repo, file path, and optionally a branch or tag.

Instructions

Read a file from a repo via the Contents API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesGitHub owner/org name.
repoYesRepository name.
pathYesFile path within the repo, no leading slash.
refNoBranch, tag, or SHA. Default: the default branch.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

No annotations are provided. The description only states 'Read a file', but does not disclose behavioral traits such as rate limits, authentication requirements, error handling, or that the GitHub Contents API returns base64-encoded content. The description fails to carry the full burden of behavioral disclosure.

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?

The description is a single, concise sentence with no fluff. However, it could include more informative context while remaining concise, such as a note about the response format.

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?

Given that an output schema exists, return values are not required in the description. However, the description lacks context about limitations (e.g., file size, not found cases) and authentication. It is minimally adequate but not complete.

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%, so all 4 parameters are already well-documented. The description adds no additional meaning beyond what the input schema provides, earning the baseline score of 3.

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 'Read a file from a repo via the Contents API' clearly states the action (Read) and resource (file from a repo), distinguishing it from sibling tools like put_file (write) and get_pr (pull request).

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 versus alternatives. The description implies reading file content, but does not state when not to use it or mention sibling tools like put_file for writing.

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/adelaidasofia/github-mcp'

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