Skip to main content
Glama

kiro_session_save

Save current Kiro CLI session to a file for later restoration, enabling persistent workflow management across development sessions.

Instructions

Save current kiro-cli session to a file using /save command

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNoOptional MCP session ID
pathYesPath to save session (relative to working directory)

Implementation Reference

  • Main handler function that executes the /save command in the kiro-cli session to save it to the specified path.
    async def _handle_session_save( session_manager: SessionManager, command_executor: CommandExecutor, arguments: dict[str, Any] ) -> dict[str, Any]: """Handle kiro_session_save tool call - save session using /save command.""" session_id = arguments.get("session_id") save_path = arguments.get("path", "") if not save_path: return { "success": False, "error": "Path is required", } session = await session_manager.get_or_create_session(session_id) # Execute /save command result = await command_executor.execute_command( session, f"/save {save_path}" ) return { **result.to_dict(), "session_id": session.id, "save_path": save_path, }
  • Input schema definition for the kiro_session_save tool, defining parameters session_id (optional) and path (required).
    { "name": "kiro_session_save", "description": "Save current kiro-cli session to a file using /save command", "inputSchema": { "type": "object", "properties": { "session_id": { "type": "string", "description": "Optional MCP session ID" }, "path": { "type": "string", "description": "Path to save session (relative to working directory)" } }, "required": ["path"] } }
  • Registration of the kiro_session_save handler in the main tool dispatch function handle_call_tool.
    elif name == "kiro_session_save": result = await _handle_session_save( session_manager, command_executor, arguments )
  • Tool listing handler that registers all tools including kiro_session_save via get_all_tools() from tools.py.
    @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 ]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vanphappi/kiro-cli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server