registerInto static method

void registerInto(
  1. McpToolRegistry registry,
  2. PackageModule module,
  3. ZuraffaDIContainer di
)

Registers every tool of module into registry under the module's package namespace, building the tools against di (the consuming app's container, populated by the module's registrar).

Throws StateError (from McpToolRegistry.register) when a namespaced name is already taken — typically the same package registered twice, which is a wiring bug the operator must fix (FR-009: collision-safe, never silently overwritten).

Implementation

static void registerInto(
  McpToolRegistry registry,
  PackageModule module,
  ZuraffaDIContainer di,
) {
  for (final tool in module.buildAgentTools(di)) {
    registry.register(_NamespacedTool(module.packageName, tool));
  }
}