> ## Documentation Index
> Fetch the complete documentation index at: https://opencanvas.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ping: Canvas Health Check

> Use ping to confirm your agent's MCP connection to DesignJS is live. Returns pong: true and a timestamp when the canvas bridge is connected.

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

<ResponseField name="pong" type="boolean" required>
  Always `true` when the canvas is connected and the bridge is healthy.
</ResponseField>

<ResponseField name="at" type="number" required>
  Unix timestamp in milliseconds recorded at the moment the canvas processed the ping.
</ResponseField>

## Example

<CodeGroup>
  ```json request theme={null}
  {
    "method": "tools/call",
    "params": {
      "name": "ping",
      "arguments": {}
    }
  }
  ```

  ```json response theme={null}
  {
    "content": [
      {
        "type": "text",
        "text": "{\"pong\": true, \"at\": 1713456789012}"
      }
    ]
  }
  ```
</CodeGroup>

<Tip>
  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.
</Tip>
