Branch
branch
GitBranchTool — create or checkout git branches.
GitBranchTool
Bases: AXMTool
Create or checkout a git branch in one call.
Registered as git_branch via axm.tools entry point.
Source code in packages/axm-git/src/axm_git/tools/branch.py
name
property
Tool name used for MCP registration.
execute(*, name, from_ref=None, checkout_only=False, path='.', **kwargs)
Create or checkout a git branch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Branch name (required). |
required |
from_ref
|
str | None
|
Optional ref to branch from (tag, commit, branch). |
None
|
checkout_only
|
bool
|
If True, checkout existing branch without creating. |
False
|
path
|
str
|
Project root directory. |
'.'
|
Returns:
| Type | Description |
|---|---|
ToolResult
|
ToolResult with branch name on success. |