← Back to WebMCP domain

WebMCP.invokeTool

Invokes a registered tool.

Domain: WebMCP experimental

Parameters

NameTypeDescription
frameIdPage.FrameIdFrame in which to invoke the tool.
toolNamestringName of the tool to invoke.
inputobjectInput parameters for the tool, matching the tool's inputSchema.

Returns

NameTypeDescription
invocationIdstringUnique 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"}