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

    Class PromptRegistrationAdapter

    Deterministic prompt registrar over the MCP SDK server.

    The adapter queues registrations until commit() so prompts 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 PromptRegistrationAdapter(server, {
    shouldRegister: (_name, { requiredTools }) => requiredTools.includes("b2_list_buckets"),
    });
    registrar.registerPrompt("b2_audit_public_exposure", {
    argsSchema: { limit: z.string().optional() },
    }, handler);
    registrar.commit();

    Implements

    Index
    • Register all queued prompts with the MCP SDK.

      Returns number

      Number of registered prompt records.

    • Check whether a prompt was queued for registration.

      Parameters

      • name: string

        MCP prompt name.

      Returns boolean

      true when the adapter has a record for the prompt.