Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/core/src/webmcp/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ export interface Annotations {
* with the external world.
*/
consequentialHint?: boolean;

/**
* Whether the tool is intended for debugging and development purposes rather than end-user
* agent interaction.
*/
debugging?: boolean;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions packages/core/test/webmcp/declare_tool_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ describe('declareExperimentalWebMcpTool', () => {
readOnlyHint: true,
untrustedContentHint: true,
consequentialHint: true,
debugging: true,
},
},
Injector.create({providers: []}),
Expand All @@ -91,6 +92,7 @@ describe('declareExperimentalWebMcpTool', () => {
readOnlyHint: true,
untrustedContentHint: true,
consequentialHint: true,
debugging: true,
},
}),
jasmine.anything(),
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/signals/src/api/structure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export interface FormOptions<TModel> {
* 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
Expand Down
3 changes: 3 additions & 0 deletions packages/forms/signals/src/webmcp/registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown> | unknown[]) => {
// Populate the form with changes from the agent.
Expand Down
1 change: 1 addition & 0 deletions packages/forms/signals/test/web/webmcp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ describe('Signal Forms WebMCP Integration', () => {
annotations: {
readOnlyHint: false,
untrustedContentHint: false,
debugging: false,
},
}),
jasmine.anything(),
Expand Down
Loading