@backblaze-labs/b2-mcp
    Preparing search index...

    Function checkDestructive

    • Evaluate whether a tool call may proceed. Call at the top of a destructive tool's handler; if ok is false, return toolError(result.error).

      Under the confirm policy, approval can be supplied by the legacy model-provided confirm: true fallback, or by the audited tool wrapper installing elicitation consent after validating server-minted requestState. New handlers should keep calling this function normally.

      Parameters

      • toolName: string

        MCP tool name being invoked.

      • args: Record<string, unknown>

        Tool arguments for this invocation.

      • config: B2Config

        Server configuration containing destructive policy.

      Returns GateResult

      The gate decision for the requested tool call.