import mcp_client
import json


# --1<-- [start:MCPAgent]
class MCPAgent:
    """MCP Agent."""

    def invoke(self,decision) -> str:
        agent_name = decision["agent"]
        tool_name = decision["tool_name"]
        tool_args = json.dumps(decision["tool_args"])

        rst = mcp_client.main(agent_name, tool_name, tool_args)
        return rst
