Skip to main content
Glama
GitHub MCP Server

GitHub MCP Server

get_branch

Fetch detailed information for a specific branch in a GitHub repository by specifying the owner, repository, and branch name.

Instructions

Get details about a specific branch

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": {
      "owner": "<owner>",
      "repo": "<repo>",
      "branch": "<branch>"
    },
    "name": "get_branch"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name
ownerYesRepository owner
branchYesBranch name

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 supplied, so the description carries the full disclosure burden, yet it says nothing about side effects, error behavior for a nonexistent branch, or authentication requirements. It also doesn't hint at what 'details' comprises, which matters because no output schema exists.

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 short sentence with the resource front-loaded and no wasted words. Its brevity is appropriate in structure, though it edges toward under-specification rather than excess.

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, no output schema, and three required parameters, the definition should explain what is returned and how failures surface. As written, an agent knows only the resource being fetched, not the shape or reliability of the response.

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 owner, repo, and branch are already documented and the baseline is 3. The description adds no extra meaning such as branch-name format, default-branch behavior, or whether owner/repo accept org or full-path forms.

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 ('Get') plus the resource ('details about a specific branch'), which is enough to separate it from list_branches or get_repository. It stops short of explicitly naming a sibling or contrasting scope, so it lands at 4 rather than 5.

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?

There is no guidance on when to reach for this tool instead of list_branches or get_repository, and no stated preconditions such as whether the branch must exist or whether the caller needs read access. The agent must infer the use case from the name alone.

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