Skip to main content
Glama

List branches

list_branches
Read-onlyIdempotent

List branches, with the project they belong to on every row: { branches: [{ branchId, name, isMain, status, projectId, projectName, workspaceName?, devDeploymentId?, parentBranchId? }] }. parentBranchId is the branch frames are inherited from (copy-on-write). projectId is optional — omit it to span every project you can read. This is the one discovery call for picking a branch; there is no separate project-listing tool. Scope: project:read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax branches to return. Default 50.
projectIdNoNarrow to one project. Omit to list branches across every project you can read — every row carries `projectId`, `projectName` and `workspaceName`, so picking a branch never needs a separate project lookup.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds the auth requirement ('Scope: project:read') and, with no output schema present, fully documents the result rows including optional fields. It also explains that parentBranchId drives copy-on-write inheritance, which is behavioral context an agent cannot get from the schema.

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?

Front-loaded with the verb and the row shape, then scoping and permissions — well ordered and dense. It loses a point for restating the projectId optionality that the schema already makes explicit.

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?

For a two-parameter read tool with no output schema, the description supplies the response shape, the optional fields, the auth scope, and the default behavior — everything an agent needs to call it and interpret results correctly.

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 coverage is 100% and the schema descriptions already state the limit default and that omitting projectId spans all readable projects, so the description largely restates them. The nested field notes (workspaceName?, devDeploymentId?) describe output, not input parameters, so they do not add parameter meaning.

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?

Opens with a specific verb+resource ('List branches') and immediately states the row shape, so an agent knows both what it returns and how it differs from siblings like browse_frame or list_canvas_frames. The clarifying line that 'there is no separate project-listing tool' removes any ambiguity about which call to make.

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 frames the tool as 'the one discovery call for picking a branch' and rules out a separate project lookup, which is exactly the when-to-use guidance needed. It also states the omitted-vs-supplied projectId condition so the scoping decision is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources