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

    Class ToolRegistrationAdapter

    Deterministic tool registrar over the MCP SDK server.

    The adapter queues registrations until commit() so tools are exposed in a stable alphabetical order. It also stores the materialized schemas in a private registry used by contract tests and fixture generation.

    const registrar = new ToolRegistrationAdapter(server, {
    shouldRegister: (name) => name.startsWith("b2_"),
    });
    registrar.registerTool("b2_authorize_account", { inputSchema: {} }, handler);
    registrar.commit();

    Implements

    Index
    • Register all queued tools with the MCP SDK.

      Returns number

      Number of registered tool records.

    • Check whether a tool was queued for registration.

      Parameters

      • name: string

        MCP tool name.

      Returns boolean

      true when the adapter has a record for the tool.