Skip to main content
Glama

get_file_content

Retrieve file contents from a GitHub repository by supplying the file path. Optionally set a branch, tag, or commit SHA to read a specific version.

Instructions

Read a file from the connected GitHub repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag, or commit SHA
pathYesFile path in the repository
teamIdNoTeam ID (auto from session if omitted)
projectIdNoProject ID (auto from session if omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are present, so the description carries full responsibility for behavioral disclosure. It only says 'Read a file' without explaining return format, handling of the optional ref, authentication prerequisites, or side effects. While the read operation is inherently non-destructive, this is not stated and the description offers minimal context beyond the action itself.

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, focused sentence with no wasted words. The key action and resource are front-loaded, making it easy for an agent to parse quickly. It is appropriately sized for the tool's simplicity.

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?

For a straightforward read tool, the description is reasonably complete. The schema covers parameter semantics, and the absence of an output schema is acceptable for a tool that returns file content. However, it doesn't mention that teamId/projectId are auto-populated from session (though schema notes this), and it doesn't specify how ref defaults to the default branch. These are minor gaps but not critical given the schema's coverage.

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 provides 100% coverage with descriptive text for all four parameters (path, ref, teamId, projectId). The description adds no parameter-specific detail, so the baseline of 3 applies. The description's mention of 'file' and 'repository' loosely maps to path but doesn't enrich the schema.

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 states a clear verb ('Read') and resource ('a file from the connected GitHub repository'). It distinguishes this from sibling tools like get_repo_tree (which reads tree structure) and commit_files (which writes). The scope is 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 description implies usage but gives no explicit guidance on when to use this tool versus alternatives. It doesn't mention that it's for raw content retrieval, nor does it contrast with get_repo_tree or commit_files. The name and description make the primary use case obvious, but no alternatives or exclusions are provided.

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