Skip to main content
Glama

github_get_file_content

Fetch the contents of a specific file from a GitHub repository at a selected branch or commit to inspect, parse, or process it.

Instructions

讀取倉庫中的特定文件內容

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo分支或提交 SHA (預設: main)main
filePathYes文件路徑 (例如: src/index.js)
repositoryYes倉庫標識 (格式: owner/repo)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
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 behavioral burden. Beyond implying a read, it says nothing about authentication requirements, how the content is returned (GitHub's API typically returns base64-encoded payloads), file-size or truncation limits, or error behavior for missing paths/refs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tight sentence with no filler and the core action front-loaded. It is efficient, though its brevity also reflects the missing detail noted elsewhere.

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?

With no annotations and no output schema, the description should explain return semantics (encoding, truncation) and any access requirements, but it does not. For a tool exposing three parameters and binary-ish content, this leaves meaningful gaps for 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 repository format (owner/repo), filePath (with example), and ref default (main) are already documented in the schema. The description adds no additional meaning about parameter interaction, which is the expected baseline when the schema does all the work.

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?

States a specific verb and resource ('讀取' + '特定文件內容'), so an agent immediately knows this retrieves file contents from a repo. It does not differentiate from siblings such as github_get_commit or github_get_repository, but no listed sibling actually returns raw file content, so ambiguity is low.

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 gives no when-to-use guidance, no prerequisites, and names no alternatives. An agent must infer from the name alone that this is the tool for reading a single file rather than browsing commits or repositories.

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