Skip to main content
Glama

list_branches

List branches in a GitHub repository to inspect available refs, with optional filtering by protected status and pagination for large branch sets.

Instructions

List branches in a repository

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>"
    },
    "name": "list_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name
ownerYesRepository owner
per_pageNoResults per page
protectedNoFilter by protected branches

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden and delivers almost nothing: it never states that the call is read-only, what permissions or auth are required, how pagination behaves, or how many results are returned. An agent must infer safety and result shape entirely from the name.

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 front-loaded sentence with zero filler, which is well structured for a simple list tool. Its brevity borders on under-specification rather than verbosity, but no words are wasted.

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

Completeness3/5

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

For a simple read-only list tool with no output schema and full schema coverage, the minimum needed to invoke it is present via the schema. However, with no annotations and no output documentation, the description should say at least that this is a non-mutating, paginated list call.

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, per_page, and protected are already documented in the schema, and the baseline is 3. The description adds no meaning beyond it — notably it does not explain the protected filter or the per_page default.

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 names a specific verb and resource ("List branches") scoped to "a repository", so an agent knows exactly what it returns. It does not distinguish itself from siblings such as list_issues or list_pull_requests beyond the resource noun, but the resource is unambiguous.

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 when-to-use guidance: nothing says when to prefer this over create_branch or get_repository, and nothing about pagination or filtering strategy. The only implied usage is that it is a read operation on an existing repo.

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