Skip to main content
Glama

get_github_file

Read-onlyIdempotent

Read one file from a switched-on repo's default branch — by default the README, which is the quickest way to learn what a product is. Given a directory path, lists its entries instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo": "<repo>"
    },
    "name": "get_github_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile or directory path inside the repo. Default README.md.README.md
repoYesFull repo name, owner/name, exactly as list_github_repos returns it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / path / description
      Added value: +"File or directory path inside the repo. Default README.md."
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld=false, so the safety burden is light, and the description still adds real behavior: it reads only the default branch, defaults to README.md, and polymorphically returns a directory listing when given a directory path. It omits error behavior (missing file, private or inaccessible repo) and content size limits.

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?

Two short sentences, front-loaded with the primary behavior and followed by the default-path rationale and the directory caveat. Slightly muddied by the informal, ambiguous term "switched-on repo", which costs a half-step of clarity.

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?

With only two parameters and no output schema, the description does its job: it covers both the file and directory result shapes and the default path. Missing pieces are edge-case behavior — not-found handling, branch limitation rationale, and whether large files are truncated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: the path is resolved against the default branch and a directory path silently changes the result type. The "switched-on repo" phrasing weakly signals that repo must be an active connection.

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 ("Read one file from ... repo's default branch") and adds a second, non-obvious mode (directory path lists entries). The scope is unambiguous, though it never names a sibling tool or explicitly contrasts itself with change/repo 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?

Offers one concrete use case — reading the README is "the quickest way to learn what a product is" — which implies when to reach for it. There is no when-not guidance, no prerequisite (e.g. repo must be connected/active), and no explicit alternative for browsing a repo's structure beyond the implicit directory-path trick.

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