Skip to main content
Glama

Git Create Branch

git_create_branch
Idempotent

Create or switch to a Git branch following the pattern type/<ticket_id>-. Auto-derives the slug from the Leantime ticket headline when not provided.

Instructions

Create (or switch to) a branch named type/<ticket_id>-<slug> (the aibranch workflow).

If slug is omitted, the ticket headline is fetched from Leantime and slugified (Vietnamese diacritics handled).

Args:

  • ticket_id (string|number): Leantime ticket id

  • type (string, optional): branch type prefix (default "feat")

  • slug (string, optional): explicit slug; auto-derived from the ticket headline if omitted

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { branch, created }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticket_idYesLeantime ticket id
typeNoBranch type prefix, e.g. feat/fix/chore (default feat)
slugNoExplicit slug; auto-derived from ticket headline if omitted
repo_pathNoPath to the git repository. Defaults to the server's working directory.
Behavior4/5

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

Description adds value beyond annotations by detailing the auto-derivation of slug from Leantime, handling of Vietnamese diacritics, and the return format. Annotations already indicate idempotent and non-destructive, which aligns with the description's 'create or switch' behavior.

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?

Well-structured with a clear workflow statement followed by an argument list. Slightly verbose with the args list being redundant given schema, but front-loaded purpose makes it effective. Could be more concise by trimming repetitive elements.

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?

Given no output schema, the description provides the return format. Covers the entire workflow including external dependency (Leantime), defaults, and edge cases (slug omission). Completes the picture for an agent to use the tool independently.

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

Parameters5/5

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

Schema coverage is 100%, yet the description enriches understanding by explaining the naming pattern and the interaction between ticket_id and slug (auto-derived from Leantime). Provides meaning beyond parameter names and schema descriptions.

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?

Clearly states 'Create (or switch to) a branch named `type/<ticket_id>-<slug>' and references the 'aibranch workflow'. Distinguishes from sibling tools like git_commit or git_create_or_update_pr by its specific branch creation purpose.

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?

Explains the branch naming convention, how slug is derived from Leantime ticket, and defaults for type and repo_path. Does not explicitly mention when not to use or compare to alternatives, but the context is sufficiently clear for an agent to infer appropriate usage.

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/BenBen2109/ai-git-mcp'

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