MCPcopy Create free account
hub / github.com/angular/angular / executeTool

Function executeTool

packages/forms/signals/test/web/webmcp.spec.ts:18–22  ·  view source on GitHub ↗
(toolName: string, args: Record<string, unknown>)

Source from the content-addressed store, hash-verified

16 let modelContext: ModelContextMock;
17
18 async function executeTool(toolName: string, args: Record<string, unknown>) {
19 const toolsForSubmit = await modelContext.getTools();
20 const testFormSubmitTool = toolsForSubmit.find((t) => t.name === toolName)!;
21 return modelContext.executeTool(testFormSubmitTool, args);
22 }
23
24 beforeEach(() => {
25 // Firefox throws a security error with this.

Callers 1

webmcp.spec.tsFile · 0.85

Calls 3

getToolsMethod · 0.80
executeToolMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected