Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destNoOptional destination directory (absolute path recommended; defaults to ./<name> under the MCP server's working directory)
nameYesName of the repository registered with LGH, with or without .git suffix (find exact names with lgh_list)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, openWorldHint=false, destructiveHint=false. The description goes well beyond by disclosing refusal conditions (unregistered name, server down, non-empty destination), the no-overwrite guarantee, and the returned JSON fields (name, clone_url, destination, branch, HEAD). This is rich behavioral context the annotations do not carry.

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?

Front-loaded with purpose, then usage, then error semantics, then return shape. Dense but every clause earns its place; slightly long with multi-clause sentences, costing a point against maximal tightness.

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?

No output schema exists, so the description compensates by naming the returned fields. Combined with prerequisites, failure modes, and no-overwrite guarantees, an agent has everything needed to invoke this correctly.

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

Parameters3/5

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

Schema description coverage is 100% and both parameters are already documented in the schema, including dest defaulting and the .git suffix note. The description repeats the .git allowance without adding format or syntax beyond the schema, so baseline 3 is correct.

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?

States a specific verb (clone) plus resource (repository from LGH local server into a working directory), and immediately positions it relative to siblings: 'the restore side of the backup loop and the inverse of lgh_up.' An agent can distinguish it from lgh_up without reading schemas.

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?

Gives explicit when-to-use ('recover a working copy after data loss or materialize an existing backup on a new machine') and a prerequisite chain: find the name with lgh_list, ensure server is up via lgh_status otherwise lgh_serve_start. This is exactly the routing guidance the dimensions reward.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.