diff --git a/packages/core/test/webmcp/declare_tool_spec.ts b/packages/core/test/webmcp/declare_tool_spec.ts index 98ba11073ed..0607cf9f96c 100644 --- a/packages/core/test/webmcp/declare_tool_spec.ts +++ b/packages/core/test/webmcp/declare_tool_spec.ts @@ -62,40 +62,6 @@ describe('declareExperimentalWebMcpTool', () => { }); }); - it('should pass tool annotations to registerTool', async () => { - const execute = jasmine.createSpy>('execute'); - const modelContext = (globalThis.document as any).modelContext; - const registerSpy = spyOn(modelContext, 'registerTool').and.callThrough(); - - await declareExperimentalWebMcpTool( - { - name: 'annotatedTool', - description: 'A tool with annotations', - inputSchema: {type: 'object', properties: {}}, - execute, - annotations: { - readOnlyHint: true, - untrustedContentHint: true, - consequentialHint: true, - debugging: true, - }, - }, - Injector.create({providers: []}), - ); - - expect(registerSpy).toHaveBeenCalledWith( - jasmine.objectContaining({ - annotations: { - readOnlyHint: true, - untrustedContentHint: true, - consequentialHint: true, - debugging: true, - }, - }), - jasmine.anything(), - ); - }); - it('should throw if the tool is already registered', async () => { const injector = Injector.create({providers: []}); diff --git a/packages/forms/signals/src/api/structure.ts b/packages/forms/signals/src/api/structure.ts index 0648b3b03a2..bcabbf4d393 100644 --- a/packages/forms/signals/src/api/structure.ts +++ b/packages/forms/signals/src/api/structure.ts @@ -74,8 +74,8 @@ export interface FormOptions { * Set of configuration values extending the core tool behavior. */ annotations?: { - // `readOnlyHint` and `untrustedContentHint` are intentionally omitted as they have - // hard-coded values. + // `readOnlyHint`, `untrustedContentHint`, and `debugging` are intentionally omitted as they + // have hard-coded values. /** * A hint that the tool will have consequential effects like mutating state or interacting diff --git a/packages/forms/signals/src/webmcp/registration.ts b/packages/forms/signals/src/webmcp/registration.ts index a4d7a16d805..16b2786ef69 100644 --- a/packages/forms/signals/src/webmcp/registration.ts +++ b/packages/forms/signals/src/webmcp/registration.ts @@ -65,6 +65,9 @@ async function initWebMcpForm( // Response text is currently hard-coded by the framework and trusted or derived from application // errors which are considered trusted. untrustedContentHint: false, + + // Forms are end-user UI elements, not developer-facing debugging tools. + debugging: false, }, execute: async (args: Record | unknown[]) => { // Populate the form with changes from the agent. diff --git a/packages/forms/signals/test/web/webmcp.spec.ts b/packages/forms/signals/test/web/webmcp.spec.ts index fba31172078..1b121f24ec7 100644 --- a/packages/forms/signals/test/web/webmcp.spec.ts +++ b/packages/forms/signals/test/web/webmcp.spec.ts @@ -64,6 +64,7 @@ describe('Signal Forms WebMCP Integration', () => { annotations: { readOnlyHint: false, untrustedContentHint: false, + debugging: false, }, }), jasmine.anything(),