Skip to main content
Glama

github_read

Read-onlyIdempotent

Read a GitHub repository's README, any file, or a directory listing by passing an owner/repo or github.com URL. Use find or offset to locate and continue through long files.

Instructions

Read from a GitHub repository: its README (no path), a file, or a directory listing. Accepts 'owner/repo' or any github.com URL (blob/tree links included). Use 'find' / 'offset' for long files.

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": "github_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoBranch, tag or commit (default: the repo's default branch)
findNoReturn only the parts of the file that mention this text
pathNoFile or directory path in the repo (omit for the README)
repoYes'owner/repo' or a github.com URL (e.g. https://github.com/o/r/blob/main/src/x.ts)
offsetNoCharacter offset to continue a long file from
maxCharsNoMax characters to return (500–50000, default 12000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds genuine behavioral detail beyond them: the default-branch fallback for 'ref', the README default when 'path' is absent, and truncation handling via find/offset. It stops short of mentioning authentication or private-repo/rate-limit behavior, which keeps it off a 5.

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?

Two sentences, front-loaded with the purpose and the modes, followed by the input-format and long-file tips. No filler and nothing repeated from the schema.

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 six parameters, full schema coverage, and no output schema, the description does enough by describing the three return shapes (README, file, directory listing) and the truncation strategy. The only real gap is what happens on missing paths or private repositories.

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 every parameter is already documented in the schema, making 3 the baseline. The description adds only the 'no path means README' rule and the accepted repo URL forms; it does not explain 'find' matching semantics or how maxChars interacts with offset.

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?

The description uses a specific verb ('Read') plus resource ('GitHub repository') and enumerates the three returnable modes: README, file contents, or directory listing. It is unambiguous what the tool does, though it never names the sibling github_search to draw the read-vs-search boundary explicitly.

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

Usage Guidelines4/5

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

It gives concrete invocation guidance: omit 'path' for the README, pass 'owner/repo' or any github.com URL including blob/tree links, and use 'find'/'offset' for long files. That is clear context for when to use which parameter, but there is no explicit 'use X instead' exclusion or statement about when not to call it.

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