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

    Interface ToolRegistrar

    Minimal registration interface implemented by ToolRegistrationAdapter.

    Tool modules depend on this interface so tests can register against a local adapter and createServer can filter or wrap callbacks consistently.

    interface ToolRegistrar {
        hasTool(name: string): boolean;
        registerTool<TArgs = any>(
            name: string,
            config: ToolRegistrationConfig,
            cb: ToolCallback<TArgs>,
        ): void;
    }

    Implemented by

    Index
    • Return whether a tool has already been registered with this registrar.

      Parameters

      • name: string

        MCP tool name to check.

      Returns boolean

      true when a matching tool record exists.

    • Register a tool with metadata and a callback.

      Type Parameters

      • TArgs = any

      Parameters

      Returns void

      Error when registration happens after commit or duplicates a name.