Chrome DevTools Protocol

Methods

WebMCP.disable

Disables the WebMCP domain.

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

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.

WebMCP.toolResponded

Event fired when a tool invocation completes or fails.

parameters
invocationId
string

Invocation identifier.

status
InvocationStatus

Status of the invocation.

output
any

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

errorText
string

Error text for protocol users.

exception
Runtime.RemoteObject

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

WebMCP.toolsAdded

Event fired when new tools are added.

parameters
tools
array[ Tool ]

Array of tools that were added.

WebMCP.toolsRemoved

Event fired when tools are removed.

parameters
tools
array[ Tool ]

Array of tools that were removed.

Types

WebMCP.Annotation

Tool annotations

Type: object

properties
readOnly
boolean

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

autosubmit
boolean

If the declarative tool was declared with the autosubmit attribute.

WebMCP.InvocationStatus

Represents the status of a tool invocation.

Allowed Values: Success, Canceled, Error

Type: string

WebMCP.Tool

Definition of a tool that can be invoked.

Type: object

properties
name
string

Tool name.

description
string

Tool description.

inputSchema
object

Schema for the tool's input parameters.

annotations
Annotation

Optional annotations for the tool.

frameId
Page.FrameId

Frame identifier associated with the tool registration.

backendNodeId
DOM.BackendNodeId

Optional node ID for declarative tools.

stackTrace
Runtime.StackTrace

The stack trace at the time of the registration.