kiro_pool_stats
Monitor process pool performance statistics to optimize response times and resource usage in Kiro CLI MCP Server workflows.
Instructions
Get process pool statistics for performance monitoring
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/kiro_cli_mcp/server.py:404-411 (handler)The main handler function for the kiro_pool_stats tool. It retrieves and returns the process pool statistics from the CommandExecutor instance.
async def _handle_pool_stats( command_executor: CommandExecutor, ) -> dict[str, Any]: """Handle kiro_pool_stats tool call - get process pool statistics.""" return { "pool_stats": command_executor.pool_stats, } - src/kiro_cli_mcp/tools.py:209-216 (schema)Tool schema definition including name, description, and empty input schema (no parameters required).
{ "name": "kiro_pool_stats", "description": "Get process pool statistics for performance monitoring", "inputSchema": { "type": "object", "properties": {} } }, - src/kiro_cli_mcp/server.py:125-126 (registration)Dispatch registration in the main handle_call_tool function that routes calls to the specific handler.
elif name == "kiro_pool_stats": result = await _handle_pool_stats(command_executor) - src/kiro_cli_mcp/executor.py:89-95 (helper)Property in CommandExecutor that provides access to the process pool stats, delegating to ProcessPool.stats if pool is active.
@property def pool_stats(self) -> dict[str, Any]: """Get process pool statistics.""" if self._process_pool: return self._process_pool.stats return {"enabled": False} - Core statistics property in ProcessPool class that computes and returns detailed pool metrics including counts and hit rate.
@property def stats(self) -> dict[str, int]: """Get pool statistics.""" return { **self._stats, "idle_count": len(self._idle_processes), "active_count": len(self._active_processes), "hit_rate": ( self._stats["cache_hits"] / max(1, self._stats["cache_hits"] + self._stats["cache_misses"]) ) * 100, }