WebMCPTool class
Represents a registered WebMCP tool available on the page.
Signature
export declare class WebMCPTool extends EventEmitter<{
toolinvoked: WebMCPToolCall;
}>
Extends: EventEmitter<{ toolinvoked: WebMCPToolCall; }>
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the WebMCPTool class.
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| annotations |
| Optional annotations for the tool. | |
| description | string | Tool description. | |
| formElement |
| Promise<ElementHandle<HTMLFormElement> | undefined> | The corresponding ElementHandle when tool was registered via a form. |
| frame | Frame the tool was defined for. | ||
| inputSchema |
| object | Schema for the tool's input parameters. |
| location |
| Source location that defined the tool (if available). | |
| name | string | Tool name. |