• Overview
@angular/core

declareExperimentalWebMcpTool

function

Declares a WebMCP tool.

API

function declareExperimentalWebMcpTool<
  InputSchema extends JsonSchemaForInference,
>(tool: ToolDescriptor<InputSchema>, injector?: Injector | undefined): void;

Description

Declares a WebMCP tool.

The tool is immediately registered and automatically unregistered when the associated injection context is destroyed.

The tool.execute function is invoked in the injection context of the provided Injector, or the injection context of declareExperimentalWebMcpTool itself.

Jump to details