Invoke a WebMCP tool

Changed on

Invoke once and wait for the result. A form may return awaiting_submission with an invocationId. Do not blindly retry if the response is lost; the tool may already have acted. Requires an active session created with enableWebMcp: true and an API key with browser.sessions.update permission.

post/api/session/{id}/webmcp/invoke

Request

Path parameters

idstring uuid required

Session ID.

Request body

toolRefstring required
inputobject

Arguments matching the tool inputSchema. At most 1 MiB when JSON encoded. Keys are passed through unchanged.

timeoutSecondsinteger

Tool execution budget in seconds. Expiration requests cancellation; it does not guarantee rollback.

Response

Success

invocationIdstring

Handle for subsequent result reads or cancellation, when provided.

status'completed' | 'error' | 'canceled' | 'awaiting_submission' required
outputunknown
errorTextstring
outputBytesinteger required

Byte length of the original JSON output.

outputTruncatedboolean

True when output exceeds 1 MiB. Full output is withheld.

outputPreviewstring

At most 4096 UTF-8 bytes of the oversized output; may be incomplete JSON.

untrustedContentboolean required
durationMsinteger required

Changes