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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"acp_message_json": "<acp_message_json>"
},
"name": "convert_acp_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| acp_message_json | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- acp_mcp_server/message_bridge.py:120-132 (handler)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}" - acp_mcp_server/server.py:86-86 (registration)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)