refactor(core): update WebMCP tool registration to be asynchronous

In the latest WebMCP specification and Chromium preview builds, `document.modelContext.registerTool` was updated to be asynchronous and return a `Promise`: https://groups.google.com/a/chromium.org/g/chrome-ai-dev-preview/c/xQWt0b1sZIE/m/UJznbNCIAwAJ?utm_medium=email&utm_source=footer

This commit update adjusts Angular's experimental WebMCP implementation (`declareExperimentalWebMcpTool` and form registration) to be async as well, returning `Promise<void>`.
This commit is contained in:
Doug Parker
2026-07-09 23:35:51 +00:00
committed by Matthew Beck
parent a8264df6c5
commit f908140d71
7 changed files with 62 additions and 60 deletions
+1 -1
View File
@@ -541,7 +541,7 @@ export class DebugNode {
}
// @public
export function declareExperimentalWebMcpTool<const InputSchema extends JsonSchemaForInference>(tool: WebMcpToolDescriptor<InputSchema>, injector?: Injector): void;
export function declareExperimentalWebMcpTool<const InputSchema extends JsonSchemaForInference>(tool: WebMcpToolDescriptor<InputSchema>, injector?: Injector): Promise<void>;
// @public
export const DEFAULT_CURRENCY_CODE: InjectionToken<string>;