list_active_runs
Retrieve a list of all active runs to monitor ongoing processes and manage workflows efficiently within the ACP-MCP integration framework.
Instructions
List all active runs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function for the 'list_active_runs' tool. It iterates over the orchestrator's active_runs dictionary, extracts key information for each run, and returns a formatted JSON string listing all active runs.@mcp.tool() async def list_active_runs() -> str: """List all active runs""" runs_info = [] for run_id, run in orchestrator.active_runs.items(): runs_info.append({ "run_id": run_id, "agent_name": run.agent_name, "status": run.status, "has_error": run.error is not None }) return json.dumps(runs_info, indent=2)
- acp_mcp_server/server.py:87-87 (registration)Invocation of register_orchestrator_tools which defines and registers the list_active_runs tool (along with other orchestrator tools) to the FastMCP instance.register_orchestrator_tools(self.mcp, self.orchestrator)