Skip to main content
Glama

kiro_chat_async

Start an asynchronous chat task to stream responses from Kiro CLI, then poll for results using kiro_task_status.

Instructions

Start an async chat task for streaming-like experience. Use kiro_task_status to poll for results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe message to send to kiro-cli
session_idNoOptional session ID. Uses active session if not provided

Implementation Reference

  • The primary handler function for the kiro_chat_async tool. It creates a session if needed, sets up a task executor, starts a background task via StreamingTaskManager, and returns the task ID for polling.
    async def _handle_chat_async(
        session_manager: SessionManager,
        command_executor: CommandExecutor,
        task_manager: StreamingTaskManager,
        arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """Handle kiro_chat_async tool call - start async chat with polling support."""
        message = arguments.get("message", "")
        session_id = arguments.get("session_id")
        
        session = await session_manager.get_or_create_session(session_id)
        
        # Create task executor
        executor = create_chat_task_executor(command_executor, session)
        
        # Start async task
        task = await task_manager.start_task(
            session_id=session.id,
            message=message,
            executor=executor,
        )
        
        return {
            "task_id": task.task_id,
            "session_id": session.id,
            "status": task.status.value,
            "message": "Task started. Poll kiro_task_status for updates.",
        }
  • JSON Schema definition for the kiro_chat_async tool, including input parameters and description used for MCP tool listing and validation.
    {
        "name": "kiro_chat_async",
        "description": "Start an async chat task for streaming-like experience. Use kiro_task_status to poll for results.",
        "inputSchema": {
            "type": "object",
            "properties": {
                "message": {
                    "type": "string",
                    "description": "The message to send to kiro-cli"
                },
                "session_id": {
                    "type": "string",
                    "description": "Optional session ID. Uses active session if not provided"
                }
            },
            "required": ["message"]
        }
    },
  • Dispatch routing in the main call_tool handler that directs kiro_chat_async calls to the specific _handle_chat_async function.
    elif name == "kiro_chat_async":
        result = await _handle_chat_async(
            session_manager, command_executor, task_manager, arguments
        )
    elif name == "kiro_task_status":
  • Helper function called by the handler to create the TaskExecutor (StreamingChatExecutor wrapper) that performs the actual async chat execution with progress chunking.
    def create_chat_task_executor(
        command_executor: Any,
        session: Any,
    ) -> TaskExecutor:
        """Create a task executor for chat.
        
        Args:
            command_executor: The CommandExecutor to use
            session: The Session to use
            
        Returns:
            A TaskExecutor function
        """
        streaming_executor = StreamingChatExecutor(command_executor)
        
        async def executor(task: AsyncTask) -> str:
            return await streaming_executor.execute(task, session)
        
        return executor
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the async nature and need for polling, which adds some context, but fails to cover critical aspects: it doesn't specify if this is a read-only or mutating operation, what permissions are required, potential rate limits, error handling, or what the initial response looks like. For an async tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and well-structured: two sentences that efficiently convey the tool's purpose and usage. The first sentence explains what it does, and the second provides essential guidance. There is no wasted language, and it's front-loaded with key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (async operation with polling), no annotations, and no output schema, the description is moderately complete. It covers the async nature and polling requirement but lacks details on behavioral traits, error handling, and output expectations. It's adequate as a starting point but has clear gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for both parameters ('message' and 'session_id'). The description adds no additional parameter semantics beyond what's in the schema. According to the rules, with high schema coverage (>80%), the baseline is 3 even without extra param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Start an async chat task for streaming-like experience.' It specifies the verb ('Start'), resource ('async chat task'), and distinguishes it from the synchronous 'kiro_chat' sibling by emphasizing the async nature. However, it doesn't explicitly contrast with other async-related tools like 'kiro_task_status' beyond mentioning it for polling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage guidance: 'Use kiro_task_status to poll for results,' which explicitly directs users to a sibling tool for follow-up actions. It implies this tool initiates a task that requires polling, but it doesn't specify when to use this versus the synchronous 'kiro_chat' or other task-related tools like 'kiro_task_list', leaving some context gaps.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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