Skip to main content
Glama

convert_acp_message

Convert ACP message JSON to MCP-compatible format for integration between ACP agents and MCP clients, enabling communication and compatibility across protocols.

Instructions

Convert ACP message format to MCP-compatible format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
acp_message_jsonYes

Implementation Reference

  • The core handler function for the 'convert_acp_message' tool. It parses input JSON as ACPMessage, converts it to MCP format using MessageBridge.acp_to_mcp, and returns JSON-serialized MCP content.
    async def convert_acp_message(acp_message_json: str) -> str:
        """Convert ACP message format to MCP-compatible format"""
        try:
            import json
            message_data = json.loads(acp_message_json)
            acp_message = ACPMessage(**message_data)
            
            mcp_content = await bridge.acp_to_mcp([acp_message])
            
            return json.dumps([content.dict() for content in mcp_content], indent=2)
            
        except Exception as e:
            return f"Error: {e}"
  • Invocation of register_bridge_tools which defines and registers the convert_acp_message tool using @mcp.tool() decorator.
    register_bridge_tools(self.mcp, self.message_bridge)

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/GongRzhe/ACP-MCP-Server'

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