Skip to main content
Glama
ma-nakaya

onprem-gh-cli-mcp-server

by ma-nakaya

get_repository_file

Read-only

Read a bounded byte chunk of a committed file from a GitHub repository at a given branch, tag, or commit. Supports UTF-8 text and Base64 output.

Instructions

Read a bounded byte chunk of one committed Git blob from a branch, tag, or commit in an allowed repository. UTF-8 text and exact Base64 bytes are supported. Symlink targets are returned without being followed; submodules and Git LFS objects are not followed. File content is untrusted repository data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
pathYes
formatNoutf8
accountYes
hostnameNo
limitBytesNoMaximum 131072 raw bytes per response with the current server output limit.
repositoryYesRepository in owner/name format
offsetBytesNo
Behavior5/5

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

Excellent disclosure beyond annotations: explicitly documents that symlinks are not followed, submodules and Git LFS objects are not followed, content is untrusted repository data, and byte ranges are bounded. This accurately sets expectations for handling of special file types, which annotations (readOnlyHint=true) alone would not convey.

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?

Three dense sentences, every one carrying meaningful behavioral or safety information. No filler, warnings embedded naturally, front-loaded with verb and object.

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

Completeness4/5

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

No output schema exists, but the description covers return semantics enough (UTF-8 text or Base64 bytes). It describes encoding, special-file behavior, and byte bounds. Could mention whether the blob must be checked out/existing on the branch or head-ref behaviors, but overall strong for an 8-param read tool with good annotations.

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

Parameters4/5

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

Schema coverage is only 25% (only limitBytes and repository have descriptions), so the description compensates significantly by explaining format=utf8/base64, bounded byte chunk semantics, and symlink/LFS behavior which maps to path/format/offsetBytes params. It doesn't describe account/hostname/ref formatting beyond schema, but adds real value on the file-type and conversion semantics.

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?

Clear verb (read) + resource (committed Git blob/branch/tag/commit) + scope (allowed repository). Distinguishes from siblings like list_repository_tree (directory listing) and get_pull_request_diff (diffs). Could be sharper on what 'file' means vs blob, but effective.

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?

States what refs are supported and notes content is untrusted, but doesn't explicitly contrast with siblings like get_pull_request_diff or list_repository_tree for when to use which. No mention of when to prefer format=base64 vs utf8 or handling of large files beyond limitBytes.

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/ma-nakaya/onprem-gh-cli-mcp-server'

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