Skip to main content
The ping tool is a zero-argument health check you can call at any point in your agent’s workflow to confirm that the MCP server is running and the WebSocket bridge to the browser canvas is connected. It returns pong: true along with a Unix millisecond timestamp so you can measure round-trip latency or record when the check occurred. If the canvas tab is closed or the bridge is disconnected, the call will fail with an MCP error — making ping a reliable guard before running a sequence of write operations.

Parameters

ping takes no parameters. Pass an empty object as arguments.

Response

boolean
required
Always true when the canvas is connected and the bridge is healthy.
number
required
Unix timestamp in milliseconds recorded at the moment the canvas processed the ping.

Example

Call ping at the start of any agent session that will make multiple tool calls. If it fails, prompt the user to open the DesignJS browser tab and confirm the connection indicator in the top-right corner shows green.