Skip to main content
Glama

github_readonly.get_file_contents

Get the contents of a file or directory from a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoAccepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head`
shaNoAccepts optional commit SHA. If specified, it will be used instead of ref
pathNoPath to file/directory/
repoYesRepository name
ownerYesRepository owner (username or organization)
fieldsNoSubset of fields to return for each entry when the path is a directory. If omitted, all fields are returned. Ignored when the path is a single file. Use this to reduce response size when listing directories and you only need specific fields, e.g. just 'name' and 'type'.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure, yet it only states the operation without mentioning read-only semantics, error cases, default ref behavior, or response format. The 'github_readonly' prefix hints at safety, but the description itself adds no behavioral context.

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?

A single front-loaded sentence states the complete purpose with no filler words. It is appropriately sized for a straightforward resource access operation.

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 schema covers parameter semantics well, but the absence of annotations and an output schema leaves the description as the sole behavioral guide. It fails to mention return shape (e.g., whether file content is raw or encoded) or default ref semantics, which an agent would need for fully correct invocation.

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 the parameters are already fully documented in the input schema; the description contributes no additional meaning about owner, repo, path, ref, sha, or fields. A baseline 3 is appropriate since the description does not need to compensate for schema gaps.

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?

States a specific action ('Get the contents') and a precise resource ('a file or directory from a GitHub repository'), which clearly distinguishes it from sibling tools that target user info or pull requests. The verb/resource combination leaves little ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit when-to-use guidance or comparison with alternatives such as github_readonly.get_me or github_readonly.pull_request_read. The intended use is only implied by the resource referenced, so an agent must infer when this tool is appropriate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources