Create a new isolated Git worktree and branch
git_worktree_createCreates an isolated worktree and branch from the latest origin/main after a bounded fetch. Client-generated names include project, local date/time, AI host, task and randomness. Optional branch and destination preserve explicit-call compatibility; enabled naming and per-project capacity rules still apply. A reached limit creates nothing and returns counts only; branch and folder names are never listed. The result identifies cached-base fallback. Existing files and worktrees remain intact; uncertain execution requires state inspection before retry. Select this tool from the user's intent when it is the best match. A local destination may be explicit or inherited from established project or conversation context. The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "git_worktree_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute existing Git worktree path; source repository is never modified or reset. | |
| task | No | Short task label used in client-generated names; cleaned and bounded by the client. | |
| branch | No | New branch name; existing names are refused and Git check-ref-format validation applies. | |
| base_ref | No | Validated local ref, HEAD, commit SHA or cached origin/main. Client 0.6.0+ defaults to origin/main with reported fallback; old clients require branch and destination and default to HEAD. | |
| device_id | No | Target computer device_id. Omit when only one computer is paired. | |
| destination | No | Absolute path to a NEW worktree directory that must not already exist. No overwrite. | |
| device_name | No | Computer name or ailinkany.com remark (e.g. home PC). Prefer this when the user names a computer. | |
| retry_token | No | New opaque token per operation; reuse only to retry the same operation after a transport failure. No user content. | |
| workflow_id | No | Optional workflow id; pass together with ai_session_id. | |
| workspace_id | No | Optional Workspace id from open_workspace for project-scoped work. | |
| ai_session_id | No | Optional Session id. Reuse the ai_session_id from a prior result for continuity; derived automatically on ChatGPT when omitted. Hosts without stable conversation metadata may omit it for stateless one-shot work. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||