Skip to main content
Glama
jesspig

git-mcp-server

by jesspig

git_clone

Clone a remote Git repository to a local directory, with options to specify a branch and shallow clone depth for partial history.

Instructions

Clone a remote repository from url into local_path, optionally pinning a branch or shallow depth. Use this when starting work on an existing project, when a full history is not needed (depth), or when a local copy must be created from a remote. Does NOT initialize a new empty repository — use git_init for that. Best for: fetching an existing repository to work on locally. Returns: confirmation text with the local path; refuses non-empty destinations, so the target must be missing or empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesRemote repository URL to clone from
depthNoShallow clone depth, 1 for full history
branchNoBranch to check out after cloning
local_pathNoLocal directory to clone into, defaults to '.' (the server working directory).
Behavior4/5

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

While the annotations are all false (not read-only, not idempotent, not destructive), the description adds meaningful behavioral context beyond those flags: it discloses the return value ('confirmation text with the local path') and a critical constraint ('refuses non-empty destinations'). This helps the agent anticipate failure conditions and the nature of the operation, though it doesn't cover every edge case (e.g., authentication).

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?

The description is well-organized: it begins with the action, then gives use cases, a non-use clarification, a 'Best for' summary, and a return/constraint note. It is appropriately sized, though the 'Best for' line partially reiterates the earlier 'starting work on an existing project' point, and could be trimmed without losing value.

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?

The description covers purpose, usage scenarios, return value, and a key behavioral restriction (non-empty destination refusal). With full schema coverage and no output schema, the description provides all necessary context for an agent to invoke the tool correctly, including the target directory requirement.

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?

The input schema already provides descriptions for all four parameters with 100% coverage. The description merely restates 'url', 'local_path', 'branch', and 'depth' without adding new semantic meaning. Therefore, the baseline of 3 applies — the schema carries the load, and the description does not materially enhance parameter understanding.

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 primary action ('Clone a remote repository from url into local_path'), the optional branch/depth pinning, and explicitly contrasts with git_init for empty repositories. This distinguishes it from sibling tools and leaves no ambiguity about what the tool does.

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?

The description provides explicit use cases: starting work on an existing project, when a full history is not needed, or when a local copy must be created from a remote. It also clearly tells the agent when NOT to use it ('Does NOT initialize a new empty repository — use git_init for that'), offering a direct alternative.

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

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