Skip to main content
Glama

Create a branch

create_branch

Creates a new branch in a Forgejo, Codeberg, or Gitea repository, optionally from an existing branch, tag, or commit, so you can isolate work or prepare changes.

Instructions

Create a branch in a repository (owner/repo/new_branch, optional old_ref; requires write mode). Answers with the branch in list_branches' shape: name, head commit and protection.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name.
ownerYesRepository owner.
old_refNoExisting branch, tag, or commit to branch from. Defaults to the repo's default branch.
new_branchYesName for the new branch.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=true. The description adds the write-mode authorization requirement and states the return payload (name, head commit, protection), which the annotations do not cover — real added value for a mutation tool.

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?

Two compact sentences, front-loaded with the action and its argument layout, then the return shape. No filler and nothing an agent must read twice.

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 low-complexity create tool with no output schema, the description covers the action, the required write-mode precondition, and the shape of the result by reference to list_branches. Nothing needed to invoke it correctly is missing.

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 100%, so all four parameters are already documented in the schema, including old_ref's default-to-default-branch behavior. The description only restates the ordering (owner/repo/new_branch, optional old_ref) without adding format or constraint detail, so the baseline 3 applies.

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+resource ('Create a branch in a repository') and pins the call shape (owner/repo/new_branch, optional old_ref). It also names the sibling whose return shape it mirrors (list_branches), so an agent can tell it apart from delete_branch/list_branches without opening a schema.

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?

Gives the key precondition ('requires write mode'), which is the main gating decision for this tool, and implicitly routes the agent to write-mode enablement. It stops short of naming enable_write_mode/write_status explicitly or saying when not to use it, so it is clear context rather than a full when/when-not guide.

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