Skip to main content
Glama
Haavi97

GitHub Context MCP Server

by Haavi97

get_file

Retrieve the contents of a file from a GitHub repository. Specify the repository and file path, and optionally a branch, tag, or commit SHA.

Instructions

Get the content of a file from a repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path inside the repo (e.g. "src/index.ts").
repoYesRepository in "owner/repo" format.
branchNoBranch, tag, or commit SHA (default: repo default branch).
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. However, it only mentions the basic 'Get the content' operation without addressing authentication, error behavior, rate limits, or return format. It adds little beyond the schema, offering minimal transparency.

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 sentence of nine words, front-loaded with the verb 'Get.' It is appropriately sized, contains no fluff, and every word contributes to the meaning.

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?

The tool is simple and the schema is complete, but the description lacks any mention of return format, error handling, or when to use this tool over list_files or search_code. With no output schema and no annotations, the description is minimally sufficient but not comprehensive.

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 documents all three parameters (path, repo, branch) with descriptions, achieving 100% coverage. The description adds no parameter-specific semantics, so it provides no value beyond the schema; baseline 3 applies.

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 identifies the action ('Get') and the resource ('content of a file from a repository'), making it specific and unambiguous. It naturally distinguishes from sibling tools like list_files (which lists) and search_code (which searches), as the verb and object are precise.

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 description states what the tool does but provides no explicit guidance on when to use it versus alternatives. The purpose implies usage when file content is needed, but there are no exclusions or references to sibling tools, so the guidance is only implied.

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

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