Skip to main content
Glama

kiro_task_cancel

Cancel a running asynchronous task by specifying its task ID to stop ongoing operations and manage workflow execution.

Instructions

Cancel a running async task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID to cancel

Implementation Reference

  • The _handle_task_cancel function that executes the kiro_task_cancel tool logic: extracts task_id from arguments, calls task_manager.cancel_task, and returns success status with message.
    async def _handle_task_cancel(
        task_manager: StreamingTaskManager,
        arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """Handle kiro_task_cancel tool call - cancel a running task."""
        task_id = arguments.get("task_id", "")
        
        cancelled = await task_manager.cancel_task(task_id)
        
        return {
            "success": cancelled,
            "task_id": task_id,
            "message": "Task cancelled" if cancelled else "Task not found or already completed",
        }
  • JSON schema definition for the kiro_task_cancel tool input, requiring a task_id string.
    {
        "name": "kiro_task_cancel",
        "description": "Cancel a running async task",
        "inputSchema": {
            "type": "object",
            "properties": {
                "task_id": {
                    "type": "string",
                    "description": "The task ID to cancel"
                }
            },
            "required": ["task_id"]
        }
    },
  • Registration in the MCP call_tool handler dispatch that matches the tool name and invokes the handler function.
    elif name == "kiro_task_cancel":
        result = await _handle_task_cancel(task_manager, arguments)

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