Skip to main content
Glama

auto_process

Process IPC messages automatically to enable communication between AI assistants, using instance identification for message handling.

Instructions

Automatically check and process IPC messages (for use with auto-check feature)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesYour instance ID

Implementation Reference

  • Handler implementation for the 'auto_process' MCP tool. Checks for pending IPC messages, processes them by acknowledging specific senders, updates the auto-check configuration timestamp, and provides a processing summary.
    elif name == "auto_process":
        if not current_session_token:
            return [TextContent(type="text", text="Error: Not registered. Please register first.")]
        
        instance_id = arguments["instance_id"]
        
        # Check for messages using existing check functionality
        check_response = BrokerClient.send_request({
            "action": "check",
            "instance_id": instance_id,
            "session_token": current_session_token
        })
        
        if check_response.get("status") != "ok":
            return [TextContent(type="text", text=f"Error checking messages: {check_response.get('message')}")]
        
        messages = check_response.get("messages", [])
        
        if not messages:
            return [TextContent(type="text", text="No messages to process.")]
        
        # Process each message
        processed = []
        for msg in messages:
            sender = msg.get("from", "unknown")
            content = msg.get("message", {}).get("content", "")
            timestamp = msg.get("timestamp", "")
            
            # Log what we're processing
            action_taken = f"From {sender}: {content[:50]}..."
            
            # Here we could add smart processing logic:
            # - If content contains "read", read the mentioned file
            # - If content contains "urgent", send acknowledgment
            # - etc.
            
            # For now, just acknowledge receipt
            if sender in ["fred", "claude", "nessa"]:  # Known senders
                ack_response = BrokerClient.send_request({
                    "action": "send",
                    "from_id": instance_id,
                    "to_id": sender,
                    "message": {
                        "content": f"Auto-processed your message from {timestamp}. Content received: '{content[:30]}...'",
                        "data": {"auto_processed": True}
                    },
                    "session_token": current_session_token
                })
                
                if ack_response.get("status") == "ok":
                    action_taken += " [Acknowledged]"
                
            processed.append(action_taken)
        
        # Update last check time
        import time
        os.makedirs("/tmp/claude-ipc-mcp", exist_ok=True)
        config_file = "/tmp/claude-ipc-mcp/auto_check_config.json"
        if os.path.exists(config_file):
            with open(config_file, 'r') as f:
                config = json.load(f)
            config["last_check"] = time.strftime("%Y-%m-%dT%H:%M:%S")
            with open(config_file, 'w') as f:
                json.dump(config, f, indent=2)
        
        # Return summary
        summary = f"Auto-processed {len(messages)} message(s):\n"
        summary += "\n".join(f"  {i+1}. {p}" for i, p in enumerate(processed))
        
        return [TextContent(type="text", text=summary)]
  • Input schema definition for the 'auto_process' tool, requiring an 'instance_id' parameter.
        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"]
        }
    )
  • The 'auto_process' tool is registered by being included in the return list of the list_tools() handler, making it available to MCP clients.
    @app.list_tools()
    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 but offers minimal behavioral disclosure. It mentions 'automatically' and 'process' but doesn't explain what processing entails, whether it's destructive, what permissions are needed, or what happens to messages. The description is insufficient for a mutation tool with zero annotation coverage.

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 appropriately brief with two concise phrases, though the parenthetical feels slightly tacked on. Every element serves a purpose, and there's no wasted verbiage.

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 tool that appears to perform automated message processing (implied mutation) with no annotations and no output schema, the description is inadequate. It doesn't explain what 'process' means, what happens to messages, what the tool returns, or any error conditions.

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% (the single parameter 'instance_id' is documented as 'Your instance ID'), so the baseline is 3. The description adds no additional parameter information beyond what the schema already provides.

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

Purpose3/5

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

The description states the tool 'Automatically check and process IPC messages' which provides a basic verb+resource combination, but it's vague about what 'process' entails and doesn't distinguish from siblings like 'check' or 'send'. The parenthetical 'for use with auto-check feature' adds some context but doesn't clarify the core purpose.

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 explicit guidance on when to use this tool versus alternatives like 'check' or 'send'. The parenthetical mention of 'auto-check feature' implies a specific context but doesn't define when this tool is appropriate versus manual checking/processing tools.

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