Skip to main content
Glama
fovi-llc

Radicle + GitHub MCP Server

by fovi-llc

rad_clone

Clone Radicle repositories using repository IDs to access peer-to-peer code collaboration projects from the Radicle + GitHub MCP Server.

Instructions

Clone a Radicle repository.

Args:
    rid: Repository ID (RID) to clone
    path: Optional path where to clone the repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ridYes
pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'rad_clone' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. Executes the 'rad clone' command using the shared run_rad_command helper, handling the RID and optional path parameters, and returns success/error messages.
    @mcp.tool()
    async def rad_clone(rid: str, path: Optional[str] = None) -> str:
        """
        Clone a Radicle repository.
        
        Args:
            rid: Repository ID (RID) to clone
            path: Optional path where to clone the repository
        """
        command = ["rad", "clone", rid]
        
        if path:
            command.append(path)
        
        result = await run_rad_command(command)
        
        if result["success"]:
            return f"✅ Successfully cloned repository {rid}\n{result['stdout']}"
        else:
            return f"❌ Failed to clone repository: {result['stderr']}"
  • Shared helper function used by rad_clone (and other tools) to execute 'rad' CLI commands asynchronously, capturing stdout/stderr/return code and handling errors.
    async def run_rad_command(command: List[str], cwd: Optional[str] = None) -> Dict[str, Any]:
        """
        Run a rad command and return the result.
        
        Args:
            command: List of command arguments starting with 'rad'
            cwd: Working directory to run the command in
            
        Returns:
            Dictionary with stdout, stderr, and return_code
        """
        try:
            # Ensure command starts with 'rad'
            if not command or command[0] != "rad":
                command = ["rad"] + command
                
            logger.info(f"Running command: {' '.join(command)}")
            
            process = await asyncio.create_subprocess_exec(
                *command,
                stdout=asyncio.subprocess.PIPE,
                stderr=asyncio.subprocess.PIPE,
                cwd=cwd
            )
            
            stdout, stderr = await process.communicate()
            
            return {
                "stdout": stdout.decode("utf-8").strip(),
                "stderr": stderr.decode("utf-8").strip(),
                "return_code": process.returncode,
                "success": process.returncode == 0
            }
            
        except FileNotFoundError:
            return {
                "stdout": "",
                "stderr": "rad command not found. Please ensure Radicle is installed.",
                "return_code": 127,
                "success": False
            }
        except Exception as e:
            return {
                "stdout": "",
                "stderr": f"Error running command: {str(e)}",
                "return_code": 1,
                "success": False
            }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without behavioral details. It doesn't disclose whether cloning requires network access, creates local files, handles errors, or has side effects like authentication needs or rate limits. This leaves significant gaps for agent understanding.

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 extremely concise and well-structured: a clear purpose statement followed by bullet-point parameter explanations. Every sentence earns its place with no wasted words, making it easy to parse quickly.

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 2 parameters with 0% schema coverage and an output schema present, the description adequately covers the basic action and parameters. However, for a clone operation with no annotations, it should ideally include more about behavioral aspects (e.g., what gets created locally, network requirements) to be fully complete for agent use.

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

Parameters4/5

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

Schema description coverage is 0%, but the description compensates by explaining both parameters: 'rid' as 'Repository ID (RID) to clone' and 'path' as 'Optional path where to clone the repository'. This adds meaningful context beyond the bare schema, though it could elaborate on RID format or path defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Clone') and resource ('a Radicle repository'), making the purpose immediately understandable. It distinguishes from siblings like rad_init (initialize) or rad_push (push changes). However, it doesn't specify what 'clone' entails in Radicle's context versus alternatives like rad_sync.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like rad_sync or rad_remote_list. The description lacks context about prerequisites (e.g., needing an existing repository ID) or typical scenarios for cloning versus other operations.

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/fovi-llc/radicle-mcp'

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