Skip to main content
Glama

register

Connect this Claude AI instance to the IPC communication system by providing a unique identifier for inter-process messaging and coordination.

Instructions

Register this Claude instance with the IPC system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesUnique identifier for this instance (e.g., 'wsl1', 'wsl2')

Implementation Reference

  • The handler for the 'register' tool in the MCP call_tool function. It computes an auth token if a shared secret is set, sends a registration request to the internal MessageBroker via BrokerClient, stores the returned session token globally for subsequent tool calls, and returns the broker's response.
    # Calculate auth token
    instance_id = arguments["instance_id"]
    shared_secret = os.environ.get("IPC_SHARED_SECRET", "")
    auth_token = ""
    if shared_secret:
        import hashlib
        auth_token = hashlib.sha256(f"{instance_id}:{shared_secret}".encode()).hexdigest()
    
    response = BrokerClient.send_request({
        "action": "register",
        "instance_id": instance_id,
        "auth_token": auth_token
    })
    
    # Store session token for this MCP instance
    if response.get("status") == "ok" and response.get("session_token"):
        # Store in a global variable for this MCP session
        global current_session_token, current_instance_id
        current_session_token = response["session_token"]
        current_instance_id = instance_id
    
    return [TextContent(type="text", text=json.dumps(response, indent=2))]
  • The JSON schema definition for the 'register' tool's input parameters, specifying that 'instance_id' is a required string.
    Tool(
        name="register",
        description="Register this Claude instance with the IPC system",
        inputSchema={
            "type": "object",
            "properties": {
                "instance_id": {
                    "type": "string",
                    "description": "Unique identifier for this instance (e.g., 'wsl1', 'wsl2')"
                }
            },
            "required": ["instance_id"]
        }
    ),
  • The MCP tool registration for 'register' occurs in the list_tools() function, which returns a list of Tool objects including the 'register' tool to the MCP protocol.
    async def list_tools() -> List[Tool]:
        """List available tools"""
        return [
            Tool(
                name="register",
                description="Register this Claude instance with the IPC system",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "instance_id": {
                            "type": "string",
                            "description": "Unique identifier for this instance (e.g., 'wsl1', 'wsl2')"
                        }
                    },
                    "required": ["instance_id"]
                }
            ),
            Tool(
                name="send",
                description="Send a message to another Claude instance",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "from_id": {
                            "type": "string",
                            "description": "Your instance ID"
                        },
                        "to_id": {
                            "type": "string",
                            "description": "Target instance ID"
                        },
                        "content": {
                            "type": "string",
                            "description": "Message content"
                        },
                        "data": {
                            "type": "object",
                            "description": "Optional structured data to send"
                        }
                    },
                    "required": ["from_id", "to_id", "content"]
                }
            ),
            Tool(
                name="broadcast",
                description="Broadcast a message to all other Claude instances",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "from_id": {
                            "type": "string",
                            "description": "Your instance ID"
                        },
                        "content": {
                            "type": "string",
                            "description": "Message content"
                        },
                        "data": {
                            "type": "object",
                            "description": "Optional structured data"
                        }
                    },
                    "required": ["from_id", "content"]
                }
            ),
            Tool(
                name="check",
                description="Check for new messages",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "instance_id": {
                            "type": "string",
                            "description": "Your instance ID"
                        }
                    },
                    "required": ["instance_id"]
                }
            ),
            Tool(
                name="list_instances",
                description="List all active Claude instances",
                inputSchema={
                    "type": "object",
                    "properties": {}
                }
            ),
            Tool(
                name="share_file",
                description="Share file content with another instance",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "from_id": {
                            "type": "string",
                            "description": "Your instance ID"
                        },
                        "to_id": {
                            "type": "string",
                            "description": "Target instance ID"
                        },
                        "filepath": {
                            "type": "string",
                            "description": "Path to file to share"
                        },
                        "description": {
                            "type": "string",
                            "description": "Description of the file"
                        }
                    },
                    "required": ["from_id", "to_id", "filepath"]
                }
            ),
            Tool(
                name="share_command",
                description="Execute a command and share output with another instance",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "from_id": {
                            "type": "string",
                            "description": "Your instance ID"
                        },
                        "to_id": {
                            "type": "string",
                            "description": "Target instance ID"
                        },
                        "command": {
                            "type": "string",
                            "description": "Command to execute"
                        },
                        "description": {
                            "type": "string",
                            "description": "Description of what this command does"
                        }
                    },
                    "required": ["from_id", "to_id", "command"]
                }
            ),
            Tool(
                name="rename",
                description="Rename your instance ID (rate limited to once per hour)",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "old_id": {
                            "type": "string",
                            "description": "Your current instance ID"
                        },
                        "new_id": {
                            "type": "string",
                            "description": "The new instance ID you want"
                        }
                    },
                    "required": ["old_id", "new_id"]
                }
            ),
            Tool(
                name="auto_process",
                description="Automatically check and process IPC messages (for use with auto-check feature)",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "instance_id": {
                            "type": "string",
                            "description": "Your instance ID"
                        }
                    },
                    "required": ["instance_id"]
                }
            )
        ]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'register' which implies a write/mutation operation, but doesn't specify whether this is idempotent, requires specific permissions, has side effects, or what happens on success/failure. This leaves significant gaps for a tool that likely modifies system state.

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 a single, clear sentence that states the tool's purpose without unnecessary words. It's appropriately sized for a simple registration tool and front-loads the essential information efficiently.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what registration entails, what the expected outcome is, or any behavioral characteristics. Given the complexity of system registration and lack of structured data, more context is needed for the agent to use this effectively.

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%, so the schema already documents the single parameter 'instance_id' with its description. The tool description adds no additional parameter information beyond what's in the schema, meeting the baseline for high schema coverage but not providing extra value.

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 action ('register') and the target ('this Claude instance with the IPC system'), making the purpose understandable. It doesn't explicitly differentiate from siblings like 'list_instances' or 'rename', but the verb 'register' implies a distinct initialization action rather than listing or modifying.

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?

The description provides no guidance on when to use this tool versus alternatives like 'list_instances' or 'check', nor does it mention prerequisites or context for registration. It states what the tool does but offers no usage context, leaving the agent to infer based on tool names alone.

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/jdez427/claude-ipc-mcp'

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