Skip to main content
Glama

Gh Get File

gh_get_file
Read-onlyIdempotent

Get file contents from a repository. Specify owner, repo name, and file path (e.g., 'README.md'). Returns raw content and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch or commit SHA (default: default branch)
pathYesFile path (e.g., "src/index.ts")
repoYesRepository name
ownerYesRepository owner

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaNoFile content SHA
urlNoAPI URL for this file
nameNoFile name
pathNoFile path in repository
sizeNoFile size in bytes
typeNoContent type (file or dir)
contentNoBase64 encoded file content
encodingNoContent encoding (base64)
html_urlNoWeb URL for this file
download_urlNoRaw download URL

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "content": {
      +      "description": "Base64 encoded file content",
      +      "type": "string"
      +    },
      +    "download_url": {
      +      "description": "Raw download URL",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "encoding": {
      +      "description": "Content encoding (base64)",
      +      "type": "string"
      +    },
      +    "html_url": {
      +      "description": "Web URL for this file",
      +      "type": "string"
      +    },
      +    "name": {
      +      "description": "File name",
      +      "type": "string"
      +    },
      +    "path": {
      +      "description": "File path in repository",
      +      "type": "string"
      +    },
      +    "sha": {
      +      "description": "File content SHA",
      +      "type": "string"
      +    },
      +    "size": {
      +      "description": "File size in bytes",
      +      "type": "number"
      +    },
      +    "type": {
      +      "description": "Content type (file or dir)",
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "API URL for this file",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "owner": "octocat",
      +    "path": "README.md",
      +    "repo": "Hello-World"
      +  },
      +  {
      +    "owner": "octocat",
      +    "path": "src/index.ts",
      +    "ref": "main",
      +    "repo": "Hello-World"
      +  }
      +]
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds 'Returns raw content and metadata,' which is useful, but it does not provide deeper behavioral context such as authentication needs, rate limits, or edge cases. No contradiction with annotations.

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, front-loaded sentence with an example, containing no superfluous information. It is concise yet covers the essential purpose and parameter specification.

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

Completeness5/5

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

For a straightforward file retrieval tool, the description is complete given the presence of a full input schema, output schema, and thorough annotations. It tells the user what to specify, what the tool does, and what it returns, which is sufficient for selection and 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 input schema already documents all four parameters (owner, repo, path, ref). The description adds an example path ('README.md') and restates the need to specify owner, repo, and path, but does not add significant meaning beyond what the schema provides.

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 clearly states the tool's purpose with a specific verb and resource: 'Get file contents from a repository.' It also specifies the required scope (owner, repo, file path) and gives an example. This distinguishes it from sibling tools like gh_get_repo (repository metadata) and gh_list_* (listings).

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 by stating what the tool does and what parameters to specify, but it does not explicitly say when to use this tool versus alternatives. There is no mention of exclusions or alternative tools, so it provides only implicit guidance.

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.

TDQS

A3.7/5.0
Disambiguation2/5

There is significant overlap among many tools: ask_pipeworx, ask_pipeworx_beta, ask_pipeworx_grounded, deep_research, and validate_claim all serve query-answer purposes with subtle differences, and multiple polymarket tools (polymarket_arbitrage, polymarket_edges, polymarket_edge_tracker, polymarket_fill_risk, polymarket_kalshi_spread) cover similar arbitrage/mispricing territory. Additionally, ai_visibility_check and scan_competitor_ai_presence clearly overlap, making it hard to pick the right one.

Naming Consistency2/5

Tool names follow no consistent pattern. Some use a gh_ prefix (gh_get_file, gh_get_repo, etc.), others are descriptive phrases (ask_pipeworx, compare_entities, bet_research), and a few are plain verbs (remember, recall, forget, subscribe, unsubscribe). The mixed conventions and varied verb/noun styles make the set feel disjointed.

Tool Count3/5

At 37 tools, the count is high but still within a usable range. However, the server is named 'Github_private' yet includes only 7 GitHub-specific tools and 30+ unrelated tools (Pipeworx data, Polymarket betting, memory, etc.). This suggests the server aggregates multiple unrelated domains, making the count feel bloated for its apparent GitHub purpose.

Completeness2/5

Given the server name, the GitHub tool surface is severely incomplete: there are no create/update/delete operations for repos, no PR creation or merging, no issue comments, no branches, and no search across repos. The Pipeworx side is fairly comprehensive, but the mismatch between the server name and the actual tool set leaves major gaps for expected GitHub workflows.