Barcode - WebMcpToolExecuteEventArgs

18 Nov 20261 minute to read

Defines the event arguments for the beforeWebMcpToolExecute event.
Provides access to the tool name and its input arguments before execution,
and allows the application to inspect or cancel the operation.

Properties

cancel boolean

Specifies whether the tool execution should be cancelled.
Set to true to prevent the tool from executing.

cancellationResponse string

Specifies a custom response message to send back to the AI when tool execution is cancelled.

registeredName string

Specifies the name the tool was registered under on document.modelContext, including any prefix.

showConfirmationDialog boolean

Set to true to display a confirmation dialog to the user before the tool executes.

toolArgs object

Specifies the arguments passed to the tool.

toolName string

Specifies the base name of the WebMCP tool being executed (e.g. 'generateBarcode').
This value never includes the prefix applied during registration.