Skip to main content
Glama

fetchGithubContent

Read-onlyIdempotent

Fetch GitHub or Gitee URL content to retrieve READMEs, file line ranges, trees, issues, PRs, commits, releases, or search repo symbols without cloning.

Instructions

Fetch GitHub/Gitee by URL: README, file (/blob/, lines), tree, issue, PR, commit, releases, or repo symbol search ('symbol'). Example: https://github.com/o/r/blob/main/src/index.ts — ref can be branch/tag/commit; not a repo clone.

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": {
      "url": "<url>"
    },
    "name": "fetchGithubContent"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoOptional branch, tag, or commit for symbol search (defaults to repo default branch).
urlYes
linesNoOptional source-file line range, 1-based inclusive (e.g. "120-180"). Only valid for /blob/ URLs; URL hash #L120-L180 also works.
symbolNoOptional code symbol to search in the repository (e.g. "Use", "RouterGroup", "createContext"). Performs fast whole-repo syntactic search.
maxResultsNoOptional max number of symbol search results to return (1-20, default 5).
releaseLimitNoOptional number of releases to return for /releases URLs (1-30, default 10).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.6.0
    • addedInput schema / properties / maxResults
      Added value: +{
      +  "description": "Optional max number of symbol search results to return (1-20, default 5).",
      +  "maximum": 20,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "Optional branch, tag, or commit for symbol search (defaults to repo default branch).",
      +  "maxLength": 100,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / symbol
      Added value: +{
      +  "description": "Optional code symbol to search in the repository (e.g. \"Use\", \"RouterGroup\", \"createContext\"). Performs fast whole-repo syntactic search.",
      +  "maxLength": 100,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.5.1
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +{}
  3. Changed1 schema field changedv1.3.12
    • addedInput schema / properties / releaseLimit
      Added value: +{
      +  "description": "Optional number of releases to return for /releases URLs (1-30, default 10).",
      +  "maximum": 30,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  4. Addedv1.3.10

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so safety is covered by structured data. The description adds only a little beyond that: the ref being branch/tag/commit and lines applying solely to /blob/ URLs — both of which are already stated in the schema. Nothing is said about authentication for private repos, rate limits, or response shape.

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?

The core capability is front-loaded in the first clause, followed by an example and a scope caveat — no filler sentences. It is dense to the point of telegraphese (slash-separated tokens, parenthetical hints), which trades readability for compactness but never wastes words.

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 no output schema, the description correctly carries the burden of saying which resource types come back and what URL forms are accepted. It covers the primary intent well, but omits access/privacy behavior for a network-facing, open-world tool and does not mention pagination or truncation for large trees or release lists.

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 83% and each of ref, lines, symbol, maxResults and releaseLimit carries its own description, so the baseline is 3. The description reinforces the valid values for ref (branch/tag/commit) and notes that #L120-L180 hash syntax works for line ranges, adding modest value beyond the schema text.

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?

States a specific verb (fetch) plus resource (GitHub/Gitee content by URL) and enumerates every supported URL kind: README, /blob/ file, tree, issue, PR, commit, releases, and symbol search. A concrete example URL is included, so an agent knows exactly what this tool returns without opening the schema.

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?

Implies usage through URL-type enumeration and adds the scope note 'not a repo clone', which tells the agent what the tool will not do. However, it gives no explicit routing against siblings like fetchWebContent or search, and no conditions such as when to prefer symbol search over a file fetch beyond the parameter default.

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

Deploy Server

Other Tools