Spec-Zone.ru › Angular

declareExperimentalWebMcpTool

Declares a WebMCP tool.

API

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

The tool to register and execute when invoked by an AI agent.

@paraminjectorInjector | undefined

Optional Injector which will automatically unregister the tool when destroyed. Defaults to the current injection context if not provided.

@returnsvoid

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.

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/core/declareExperimentalWebMcpTool

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API