Skip to main content
Glama

kiro_history_clear

Clear conversation history for a session to manage session data and maintain privacy in the Kiro CLI MCP Server environment.

Instructions

Clear conversation history for a session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNoOptional session ID

Implementation Reference

  • Executes the kiro_history_clear tool by retrieving the session and calling clear_history() on it.
    async def _handle_history_clear(
        session_manager: SessionManager,
        arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """Handle kiro_history_clear tool call."""
        session_id = arguments.get("session_id")
    
        session = await session_manager.get_or_create_session(session_id)
        session.clear_history()
    
        return {
            "success": True,
            "session_id": session.id,
        }
  • Tool schema definition including name, description, and inputSchema for kiro_history_clear.
    {
        "name": "kiro_history_clear",
        "description": "Clear conversation history for a session",
        "inputSchema": {
            "type": "object",
            "properties": {
                "session_id": {
                    "type": "string",
                    "description": "Optional session ID"
                }
            }
        }
    },
  • Registers the tool handler by dispatching to _handle_history_clear in the main call_tool handler.
    elif name == "kiro_history_clear":
        result = await _handle_history_clear(session_manager, 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 states the action ('Clear') but doesn't explain what 'Clear' entails—e.g., whether it's irreversible, requires specific permissions, affects other data, or has side effects. This leaves critical behavioral traits unspecified for a potentially destructive operation.

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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it efficient and easy to parse, which is ideal for conciseness.

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 'clear' operation with no annotations or output schema, the description is insufficient. It doesn't cover behavioral aspects like destructiveness, authorization needs, or what 'Clear' means in practice. For a tool that likely modifies or deletes data, this lack of context makes it incomplete for safe and effective 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 the parameter 'session_id' documented as 'Optional session ID'. The description adds no additional meaning beyond this, such as explaining what happens if 'session_id' is omitted or providing context for its use. With high schema coverage, the baseline score of 3 is appropriate.

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 action ('Clear') and resource ('conversation history for a session'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'kiro_session_clear' or 'kiro_history', which might have overlapping or related functionality, preventing a perfect score.

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. With siblings like 'kiro_session_clear' and 'kiro_history', there's no indication of differences, prerequisites, or exclusions, leaving the agent to guess based on tool names alone.

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