Skip to main content
Glama
wuqunfei

github-mcp-server-js

by wuqunfei

get_file_contents

Get the contents of a file or directory in a GitHub repository. Provide owner, repo, path, and an optional ref (branch, tag, or commit).

Instructions

Get the contents of a file or directory in a GitHub repository. Docs: https://docs.github.com/en/rest/repos/contents#get-repository-content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag, or commit SHA (defaults to the default branch)
pathYesPath to the file or directory
repoYesRepository name
ownerYesRepository owner (user or organization login)
Behavior2/5

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

Annotations are absent, so the description must disclose behavioral traits, but it only states 'Get the contents'. It does not mention that file content is base64-encoded, that directory paths return a listing, or any authentication or rate-limiting specifics. This lack of detail is a significant gap for a tool with no annotation support.

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 clear sentence followed by a relevant docs link. It is front-loaded with the core purpose and contains no fluff, earning its place efficiently.

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?

For a tool that fetches file or directory contents, the description is incomplete: it does not explain return format, encoding, pagination for directories, or potential errors. With no annotations and no output schema, the agent lacks critical context needed for correct invocation and interpretation of results.

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 already provides full descriptions for all four parameters, including the optional 'ref' with its default behavior. The tool description adds no parameter-specific meaning beyond what the schema offers, so the baseline score of 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?

Description uses a specific verb ('Get') and resource ('contents of a file or directory in a GitHub repository'), clearly conveying the tool's function and distinguishing it from sibling tools that deal with repo metadata, branches, commits, or trees. Including a link to official docs reinforces purpose.

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 guidance on when to use this tool versus alternatives like get_tree or create_or_update_file. It only states what it does, leaving the agent to infer use cases from the name and parameter schema without explicit exclusions or alternatives.

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/wuqunfei/github-mcp-server-js'

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