kiro_session_list
View active Kiro CLI sessions to manage multiple project workflows and monitor running processes for better orchestration.
Instructions
List all active kiro-cli sessions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/kiro_cli_mcp/server.py:229-237 (handler)The primary handler function for the kiro_session_list tool. It lists all active sessions using SessionManager.list_sessions(), formats them into a dictionary with sessions list, active session ID, and count.async def _handle_session_list(session_manager: SessionManager) -> dict[str, Any]: """Handle kiro_session_list tool call.""" sessions = await session_manager.list_sessions() return { "sessions": [s.to_info().to_dict() for s in sessions], "active_session_id": session_manager.active_session_id, "count": len(sessions), }
- src/kiro_cli_mcp/tools.py:47-54 (schema)Tool schema definition in the TOOLS list, including name, description, and empty inputSchema (no parameters required).{ "name": "kiro_session_list", "description": "List all active kiro-cli sessions", "inputSchema": { "type": "object", "properties": {} } },
- src/kiro_cli_mcp/server.py:67-78 (registration)MCP tool registration via the list_tools handler, which loads all tool definitions from tools.py (including kiro_session_list) and returns them as Tool objects.@server.list_tools() async def handle_list_tools() -> list[Tool]: """List available tools.""" tools_data = get_all_tools() return [ Tool( name=tool["name"], description=tool["description"], inputSchema=tool["inputSchema"] ) for tool in tools_data ]