Skip to main content
Glama
lfnovo

Code Expert MCP Server

by lfnovo

clone_repo

Clones a repository into MCP cache for code analysis. Use to initialize a repo from URL, optionally specifying branch, as a prerequisite for other analysis tools.

Instructions

Initialize a repository for analysis by copying it to MCP's cache. This is a prerequisite for all other analysis tools.

WHEN TO USE:

  • First time analyzing a repository

  • When explicitly switching cache strategies

  • NOT needed if already cloned (check with list_repos first if unsure)

RETURNS:

  • 'already_cloned': Repository ready for analysis, no action needed

  • 'pending': Clone started, will complete in background. You can proceed with other tools

  • 'switched_branch': Branch changed successfully (shared cache only)

  • 'error': Operation failed, see error message

CACHE STRATEGIES:

  • 'shared' (default): One cache per repo, can switch branches in-place

  • 'per-branch': Separate cache for each branch, useful for comparing branches

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
branchNo
cache_strategyNoshared
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses return values ('already_cloned', 'pending', 'switched_branch', 'error'), asynchronous behavior ('pending' means background completion), and cache strategy nuances. This is rich behavioral context beyond the schema.

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 is well-structured with clear sections (main sentence, WHEN TO USE, RETURNS, CACHE STRATEGIES). Each section adds distinct value without redundancy, and the key point (prerequisite) is front-loaded.

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?

With no output schema, the description adequately explains all possible return states. It also covers when to use, cache strategies, and prerequisites. For a tool with moderate complexity, this is complete and self-contained.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It explains cache_strategy in detail (shared vs per-branch), branch behavior via return values and cache strategy, and URL is self-evident. This fully covers parameter meaning.

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 tool initializes a repository for analysis by copying it to MCP's cache, and explicitly notes it is a prerequisite for all other analysis tools. This distinguishes it from sibling tools like list_repos and get_repo_file_content.

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?

Provides a dedicated WHEN TO USE section specifying first-time analysis, cache strategy switching, and explicitly says it is not needed if already cloned—directing users to check with list_repos. This gives clear usage context and an 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/lfnovo/code-expert-mcp'

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