← Back to WebMCP domain
WebMCP.invokeTool
Invokes a registered tool.
Domain: WebMCP
experimental
Parameters
| Name | Type | Description |
frameId | Page.FrameId | Frame in which to invoke the tool. |
toolName | string | Name of the tool to invoke. |
input | object | Input parameters for the tool, matching the tool's inputSchema. |
Returns
| Name | Type | Description |
invocationId | string | Unique identifier for this invocation. Response is sent before tool events. |
Example Request
{
"id": 1,
"method": "WebMCP.invokeTool",
"params": {
"frameId": "ABC123DEF456",
"toolName": "toolName-value",
"input": {}
}
}
Example Response
{
"id": 1,
"result": {
"invocationId": "invocationId-value"
}
}
Usage in Node.js
const result = await send('WebMCP.invokeTool', {"frameId": "ABC123DEF456", "toolName": "toolName-value", "input": {}});
console.log(result);
// {"invocationId": "invocationId-value"}