Skip to main content
Glama

List branches

list_branches
Read-only

Lists a repository's branches, most recently pushed first, returning name, head commit SHA, and protected status; use pagination or fetch all pages up to 1,000.

Instructions

List a repository's branches (owner/repo), most recently pushed first, each slimmed to name, head commit SHA and whether it is protected. Without page/limit it walks every page and returns them all, up to 1,000 with truncated set beyond that; with page/limit it returns one page. Use get_repo for the default branch, list_branch_protections for the protection rules themselves, and list_commits for a branch's history.

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page number.
repoYesRepository name.
limitNoResults per page.
ownerYesRepository owner — user or organization.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/openWorldHint; the description adds the genuinely non-obvious behavior: omitting page/limit auto-paginates everything up to a 1,000-item cap with a `truncated` flag, while supplying page/limit switches to single-page mode. That pagination/truncation contract is the main failure mode and is disclosed precisely.

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?

Three sentences, each load-bearing: what it returns, how pagination behaves, and which sibling to use instead. Scope and ordering are front-loaded with zero filler.

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

Completeness5/5

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

No output schema exists, but the description enumerates the returned fields (name, head SHA, protected) and the truncation marker, and the pagination contract is fully specified. Nothing an agent needs to call this correctly is missing.

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 page/limit/owner/repo are already documented; the description goes beyond the schema by explaining the interaction — that the presence or absence of page/limit changes the result set entirely rather than just page size. It doesn't cover limit semantics alone (default page size) in detail.

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 and resource ("List a repository's branches") plus the sort order ("most recently pushed first") and the exact projected fields returned. An agent can distinguish it from get_repo, list_commits and list_branch_protections without opening any schema.

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

Usage Guidelines5/5

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

Explicitly routes three related needs to three named siblings: default branch to get_repo, protection rules to list_branch_protections, history to list_commits. That is when-to-use guidance with alternatives named, not just implied.

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