mcp-use TypeScript API
    Preparing search index...

    Class ToolCancelledError

    The host cancelled the tool call that rendered this View before it produced a result (ui/notifications/tool-cancelled) — for example, the user stopped the turn or the request failed.

    message includes the host's reason when one was sent, or is "Tool call was cancelled." otherwise.

    Hierarchy

    • Error
      • ToolCancelledError
    Index
    • Parameters

      • Optionalreason: string

        Optional host-provided cancellation reason.

      Returns ToolCancelledError

    reason: string | undefined

    Host-provided reason for the cancellation, when present.