Skip to main content
Glama

List branches

forgejo_list_branches
Read-onlyIdempotent

List repository branches and view each branch's latest commit and protection status. Use it to verify a branch exists before creating a pull request.

Instructions

Lists the repository's branches with their latest commit and protection status.

Parameters: owner, repo, page, limit, response_format.

Returns: { total, count, page, limit, has_more, branches: [{ name, protected, commit_sha, commit_message }] }

Use it to confirm a branch exists before opening a pull request with forgejo_create_pull_request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage to fetch, 1 = first.
repoNoRepository name. Defaults to FORGEJO_DEFAULT_REPO.
limitNoItems per page (max 50).
ownerNoRepository owner (user or organisation). Defaults to FORGEJO_DEFAULT_OWNER.
response_formatNo'markdown' for a readable rendering, 'json' for the full data.markdown

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already state readOnlyHint, idempotentHint, openWorldHint, and non-destructive behavior. The description adds value by disclosing the exact return shape and that branches include protection status, commit SHA, and commit message. It does not contradict annotations.

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 compact and front-loaded with the core purpose, followed by a terse parameter list, a precise return contract, and a practical usage hint. Every sentence adds useful information without redundancy.

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?

The tool has no required parameters, rich annotations, and a fully documented input schema. The description covers the output shape and a concrete workflow context, so an agent has everything needed to invoke the tool 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?

Input schema coverage is 100%, so the schema fully documents all five parameters with defaults, constraints, and descriptions. The description only lists parameter names and the return structure, adding no new semantic meaning beyond what the schema already provides.

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 states a specific action and resource: 'Lists the repository's branches with their latest commit and protection status.' It clearly differentiates from sibling tools like forgejo_list_commits and forgejo_list_pull_requests by naming the branch resource and the exact data returned.

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 provides an explicit use case: 'Use it to confirm a branch exists before opening a pull request with forgejo_create_pull_request.' It does not discuss when not to use it or compare against alternatives, but the stated context is clear enough for an agent to select it appropriately.

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

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/Birdiz/forgejo-mcp'

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