lgh_clone
Clone a registered LGH repository to restore a working copy after data loss or materialize a backup on a new machine; it never overwrites existing files.
Instructions
Clone a repository from the LGH local server into a new working directory on this machine — the restore side of the backup loop and the inverse of lgh_up. Use it to recover a working copy after data loss or to materialize an existing backup on a new machine: find the exact registered name with lgh_list, make sure the server is up (lgh_status, otherwise lgh_serve_start), then clone. The name may carry a .git suffix. Refuses with a clear error when the name is not registered, the server is not running, or the destination directory already exists and is not empty — it never overwrites existing files. Returns JSON with name, clone_url, destination (absolute path), and the checked-out branch and HEAD commit.
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": {
"name": "<name>"
},
"name": "lgh_clone"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dest | No | Optional destination directory (absolute path recommended; defaults to ./<name> under the MCP server's working directory) | |
| name | Yes | Name of the repository registered with LGH, with or without .git suffix (find exact names with lgh_list) |