kiro_session_create
Create a new CLI session for managing multiple projects with isolated contexts and faster response times through process pooling.
Instructions
Create a new kiro-cli session. If working_directory is not provided or does not exist, the current directory will be used.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "kiro_session_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Optional agent name to use for this session | |
| working_directory | No | Working directory for the session. Must be an existing directory path. If not provided or invalid, defaults to current directory. |
Implementation Reference
- src/kiro_cli_mcp/server.py:217-227 (handler)Primary handler function that implements the logic for the kiro_session_create tool by calling SessionManager.create_session.
async def _handle_session_create( session_manager: SessionManager, arguments: dict[str, Any] ) -> dict[str, Any]: """Handle kiro_session_create tool call.""" agent = arguments.get("agent") working_directory = arguments.get("working_directory") session = await session_manager.create_session(agent, working_directory) return session.to_info().to_dict() - src/kiro_cli_mcp/tools.py:30-46 (schema)Tool schema definition including name, description, and input schema for kiro_session_create.
{ "name": "kiro_session_create", "description": "Create a new kiro-cli session. If working_directory is not provided or does not exist, the current directory will be used.", "inputSchema": { "type": "object", "properties": { "agent": { "type": "string", "description": "Optional agent name to use for this session" }, "working_directory": { "type": "string", "description": "Working directory for the session. Must be an existing directory path. If not provided or invalid, defaults to current directory." } } } }, - src/kiro_cli_mcp/server.py:98-99 (registration)Tool dispatch/registration in the main call_tool handler where kiro_session_create is routed to its handler function.
elif name == "kiro_session_create": result = await _handle_session_create(session_manager, arguments)