Skip to main content
Glama

get_file

Retrieve the contents of a file from a GitHub repository by providing owner, repository name, and path. Optionally specify a branch to fetch from.

Instructions

Get the contents of a file from a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
repoYes
ownerYes
branchNo
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic action without revealing important traits such as how file contents are returned (raw text vs base64), behavior for missing files, or default branch handling. This is a minimal disclosure for a file retrieval 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?

The description is a single, concise sentence with no wasted words. It is front-loaded with the verb and object, clearly stating what the tool does.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't mention the return value format, default behavior for the optional branch parameter, or potential error conditions. For a tool with 4 parameters, more contextual detail is needed to guide correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, and the description does not compensate by explaining any parameter semantics. It only says 'from a repository' and 'file', vaguely implying owner/repo and path, but it doesn't clarify optionality of branch or the meaning of each parameter. The description adds no value beyond the schema property names.

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 clearly states the action ('Get the contents') and the resource ('a file from a repository'). It distinguishes from sibling tools like list_directory (lists files) and get_repo (repository metadata), making the purpose unambiguous.

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?

The usage is implied by the description—use when you need file contents—but there is no explicit guidance on when not to use it or how it compares to alternatives (e.g., using search_code to find files). No exclusions or alternative tool references are provided.

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

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