Methods

Chrome DevTools

WebMCP.disable #

Disables the WebMCP domain.


Chrome DevTools

WebMCP.enable #

Enables the WebMCP domain, allowing events to be sent. Enabling the domain will trigger a toolsAdded event for all currently registered tools.

Events

Chrome DevTools

WebMCP.toolInvoked #

Event fired when a tool invocation starts.

Parameters

toolName
string

Name of the tool to invoke.

frameId
Page.FrameId

Frame id

invocationId
string

Invocation identifier.

input
string

The input parameters used for the invocation.


Chrome DevTools

WebMCP.toolResponded #

Event fired when a tool invocation completes or fails.

Parameters

invocationId
string

Invocation identifier.

status
InvocationStatus

Status of the invocation.

output
Optional
any

Output or error delivered as delivered to the agent. Missing if status is anything other than Success.

errorText
Optional
string

Error text for protocol users.

exception
Optional
Runtime.RemoteObject

The exception object, if the javascript tool threw an error>


Chrome DevTools

WebMCP.toolsAdded #

Event fired when new tools are added.

Parameters

tools
array[ Tool ]

Array of tools that were added.


Chrome DevTools

WebMCP.toolsRemoved #

Event fired when tools are removed.

Parameters

tools
array[ Tool ]

Array of tools that were removed.

Types

Chrome DevTools

WebMCP.Annotation #

Tool annotations

Type: object

Properties

readOnly
Optional
boolean

A hint indicating that the tool does not modify any state.

autosubmit
Optional
boolean

If the declarative tool was declared with the autosubmit attribute.


Chrome DevTools

WebMCP.InvocationStatus #

Represents the status of a tool invocation.

Type: string

Allowed values: Success, Canceled, Error


Chrome DevTools

WebMCP.Tool #

Definition of a tool that can be invoked.

Type: object

Properties

name
string

Tool name.

description
string

Tool description.

inputSchema
Optional
object

Schema for the tool's input parameters.

annotations
Optional
Annotation

Optional annotations for the tool.

frameId
Page.FrameId

Frame identifier associated with the tool registration.

backendNodeId
Optional
DOM.BackendNodeId

Optional node ID for declarative tools.

stackTrace
Optional
Runtime.StackTrace

The stack trace at the time of the registration.