kiro_agents_list
List available custom agents in the Kiro CLI MCP Server to manage and select agents for session orchestration and workflow support.
Instructions
List available custom agents
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/kiro_cli_mcp/server.py:280-287 (handler)The core handler function for the kiro_agents_list tool. It asynchronously lists available agents using the CommandExecutor and returns them as a JSON-serializable dictionary with agents list and count.async def _handle_agents_list(command_executor: CommandExecutor) -> dict[str, Any]: """Handle kiro_agents_list tool call.""" agents = await command_executor.list_agents() return { "agents": [a.to_dict() for a in agents], "count": len(agents), }
- src/kiro_cli_mcp/tools.py:101-108 (schema)The JSON schema definition for the kiro_agents_list tool, specifying its name, description, and empty input schema (no required parameters). This is included in the TOOLS list used for tool registration.{ "name": "kiro_agents_list", "description": "List available custom agents", "inputSchema": { "type": "object", "properties": {} } },
- src/kiro_cli_mcp/server.py:108-109 (registration)Dispatch/registration logic in the main @server.call_tool() handler. Routes calls to 'kiro_agents_list' to the dedicated _handle_agents_list function.elif name == "kiro_agents_list": result = await _handle_agents_list(command_executor)
- src/kiro_cli_mcp/server.py:67-78 (registration)The @server.list_tools() handler that registers all tools, including kiro_agents_list, by calling get_all_tools() from tools.py and converting to MCP 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 ]