Skip to main content
Glama

Create issue development branch

gh_create_branch

Create a GitHub branch linked to a specified issue, resolving the base to an exact commit and verifying branch ref and target SHA before finishing.

Instructions

Additive write: create exactly one branch linked to the specified issue after ordinary write authorization. The requested or default branch-name base is resolved to an exact commit and rechecked immediately before one mutation. Authoritative bounded readback verifies the exact issue association, branch ref, and target SHA. Full commit SHAs in base are rejected; use gh_create_branch_from_sha for a caller-supplied immutable base. The operation never moves or deletes refs and never blindly retries an ambiguous mutation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoExisting branch-name base resolved to an exact commit immediately before creation; full commit SHAs are rejected.
nameYesNew development branch name.
repoYesGitHub repository name without the owner prefix.
ownerYesGitHub repository owner or organization login.
issue_numberYesPositive issue number to link to the new development branch.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
nameYes
createdYes
messageYes
warningNo
base_shaYes
request_idNo
write_completedYes
linked_branch_idNo
readback_completedYes
precondition_checkedYes
state_matches_requestedYes
Behavior5/5

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

The description adds substantial behavioral detail beyond the annotations: it is additive, never moves or deletes refs, performs an authoritative bounded readback, and never blindly retries an ambiguous mutation. This complements the annotations without contradicting them.

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 dense but every sentence earns its place: purpose, safety model, verification behavior, and the key alternative are all covered in four sentences with no filler.

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 write operation with concurrency and safety considerations, the description covers purpose, authorization, base resolution, verification, and exclusions. The presence of an output schema means return-value details are not required in the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaningful semantics for the base parameter by explaining that branch-name bases are resolved to an exact commit and full SHAs are rejected, and it clarifies the issue linkage requirement.

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 opens with 'Additive write: create exactly one branch linked to the specified issue,' which names a specific verb, resource, and scope. It also explicitly distinguishes itself from the sibling gh_create_branch_from_sha by rejecting full commit SHAs.

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?

The description gives clear usage context: it is for creating a branch linked to an issue after ordinary write authorization. It also explicitly names the alternative tool for caller-supplied immutable bases: 'use gh_create_branch_from_sha for a caller-supplied immutable base.'

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/fvanevski/gh_mcp'

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