Skip to main content
Glama

Git Clone

git_clone

Clone Git repositories from remote URLs to local paths via HTTP, HTTPS, or SSH. Supports shallow cloning, specific branches, and bare mirrors.

Instructions

Clone a repository from a remote URL to a local path. Supports HTTP/HTTPS and SSH URLs, with optional shallow cloning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesRemote repository URL to clone from.
localPathYesLocal path where the repository should be cloned.
branchNoSpecific branch to clone (defaults to remote HEAD).
depthNoCreate a shallow clone with history truncated to N commits.
bareNoCreate a bare repository (no working directory).
mirrorNoCreate a mirror clone (implies bare).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesIndicates if the operation was successful.
remoteUrlYesThe remote URL that was cloned.
localPathYesLocal path where repository was cloned.
branchYesThe branch that was checked out.
commitHashNoCurrent HEAD commit hash.
Behavior3/5

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

The annotation provides readOnlyHint: false, confirming this is a write operation. The description adds valuable context about protocol support and shallow cloning, but fails to disclose critical behavioral traits like error handling when localPath already exists, directory creation behavior, or authentication mechanisms for private repos.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of exactly two efficient sentences with zero redundancy. The first sentence establishes the core operation, and the second adds capability details (protocols/shallow cloning). Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the existence of an output schema, return values need not be described. However, for a filesystem-mutating operation with 6 parameters, the description lacks operational details such as conflict resolution behavior, disk space requirements, or network dependency warnings that would help an agent handle failures gracefully.

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?

With 100% schema description coverage, the baseline is appropriately met. The description references 'shallow cloning' (mapping to the depth parameter) and protocol support (mapping to URL format), but adds minimal semantic meaning beyond what the well-documented schema already provides.

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?

The description clearly states the specific action (clone), resource (repository), and scope (remote URL to local path). It effectively distinguishes from siblings like git_init (which creates empty repositories) and git_pull (which updates existing ones) by emphasizing the remote-to-local copy operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description implies usage by mentioning HTTP/HTTPS/SSH support and shallow cloning, it lacks explicit guidance on when to use this versus alternatives (e.g., 'use git_init for creating new empty repositories instead') or prerequisites (e.g., authentication requirements for private repositories).

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/cyanheads/git-mcp-server'

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