List branches
forgejo_list_branchesList 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.
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": "forgejo_list_branches"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page to fetch, 1 = first. | |
| repo | No | Repository name. Defaults to FORGEJO_DEFAULT_REPO. | |
| limit | No | Items per page (max 50). | |
| owner | No | Repository owner (user or organisation). Defaults to FORGEJO_DEFAULT_OWNER. | |
| response_format | No | 'markdown' for a readable rendering, 'json' for the full data. | markdown |