Skip to main content
Glama

list_branches

List all branches of a repository by providing owner and repo name, returning up to 100 branch objects with name and SHA, to discover branches before cloning or creating a pull request.

Instructions

Use this when you need to discover branches before cloning or creating a PR. Returns a JSON array of branch objects with name and SHA. Requires 'owner' and 'name'. Returns up to 100 branches. See also: get_repo, create_pull_request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYes
nameYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the output format (JSON array with name and SHA), required parameters, and a pagination limit (up to 100 branches). This adequately informs the agent of the tool's behavior, though more detail on authentication or rate limits would improve it.

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?

The description is only two sentences, front-loaded with the use case, and every sentence adds value. There is no redundancy or fluff.

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?

Given the tool's low complexity (2 simple params, no nested objects, no output schema), the description covers the key aspects: purpose, input, output format, and constraints. It could optionally mention error handling or sorting, but it is sufficient for correct invocation.

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 0%, so the description must compensate. It states 'Requires owner and name', which is minimal. It does not clarify that 'owner' is the repository owner and 'name' is the repository name, leaving some interpretation to the agent. This is adequate but not rich.

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?

The description clearly states the tool's purpose: 'discover branches before cloning or creating a PR'. It specifies the verb 'discover' and the resource 'branches', and provides concrete use cases that differentiate it from similar tools like 'get_repo' and 'create_pull_request'.

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?

The description explicitly tells when to use the tool ('before cloning or creating a PR') and references alternatives ('See also: get_repo, create_pull_request'). It does not explicitly state when not to use it, but the context is clear enough for the agent.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gitopia/gitopia-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server