Skip to main content
Glama

kiro_chat

Send chat messages to Kiro CLI for AI responses with session management, process pooling, and multi-project workflow support.

Instructions

Send a chat message to kiro-cli and get AI response

Input Schema

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

Implementation Reference

  • Primary handler function _handle_chat that executes the core logic: extracts arguments, gets/creates session, executes chat via command_executor, handles streaming flag (fallback), returns response as dict.
    async def _handle_chat(
        session_manager: SessionManager,
        command_executor: CommandExecutor,
        arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """Handle kiro_chat tool call."""
        message = arguments.get("message", "")
        session_id = arguments.get("session_id")
        stream = arguments.get("stream", False)
    
        session = await session_manager.get_or_create_session(session_id)
    
        if stream:
            # Note: Streaming not fully supported in current MCP SDK
            # Fall back to non-streaming
            logger.warning("Streaming requested but not fully supported, using non-streaming")
    
        response = await command_executor.execute_chat(session, message)
        return response.to_dict()
  • Input schema definition for the kiro_chat tool, specifying parameters: message (required), session_id (optional), stream (boolean, default False).
    {
        "name": "kiro_chat",
        "description": "Send a chat message to kiro-cli and get AI response",
        "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"
                },
                "stream": {
                    "type": "boolean",
                    "description": "Whether to stream the response",
                    "default": False
                }
            },
            "required": ["message"]
        }
    },
  • Registration via handle_list_tools decorator (@server.list_tools()), which constructs and returns Tool objects from tools.py definitions, including kiro_chat.
    @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
        ]
  • Dispatch logic in main @server.call_tool() handler that routes 'kiro_chat' calls to the _handle_chat function.
    if name == "kiro_chat":
        result = await _handle_chat(session_manager, command_executor, arguments)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions sending a message and getting an AI response, but it doesn't cover critical aspects like authentication needs, rate limits, error handling, or what the response format looks like (especially since there's no output schema). This leaves significant gaps for an agent to understand the tool's behavior.

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 a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy for an agent to quickly grasp the core functionality.

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

Completeness2/5

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

Given the complexity of a chat tool with AI interaction, no annotations, and no output schema, the description is incomplete. It lacks details on response format, error conditions, or behavioral traits like streaming implications. This makes it inadequate for an agent to fully understand how to invoke and interpret results from this tool.

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?

Schema description coverage is 100%, so the schema already documents all parameters (message, session_id, stream) with their types and descriptions. The description adds no additional meaning beyond what the schema provides, such as examples or usage context for parameters. Baseline 3 is appropriate when the schema does the heavy lifting.

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 with a specific verb ('send') and resource ('chat message to kiro-cli'), and it includes the outcome ('get AI response'). It distinguishes from some siblings like kiro_history (history-related) and kiro_session_* (session management), but it doesn't explicitly differentiate from kiro_chat_async (which likely handles asynchronous chat).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention kiro_chat_async (a likely sibling for async operations) or other chat-related tools, nor does it specify any prerequisites, contexts, or exclusions for usage.

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