sophos_run_live_query
Execute ad-hoc SQL queries on endpoints in real time for threat investigation, returning a run ID to track status and results.
Instructions
Run an ad-hoc Live Discover SQL query against one or more endpoints in real time. Returns a run ID to poll for status and results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SQL query string to execute on endpoints (15–50000 characters) | |
| tenant_id | Yes | The tenant ID to run the live query against | |
| variables | No | JSON array of variable objects to substitute into the query template. Each object must have: name (string), dataType (double|integer|text|dateTime|boolean), value (string), and optionally pivotType (deviceId|deviceName|sophosPid|ipAddress|username|sha256|filePath|registryKey|url). | |
| query_name | No | Human-readable name for this query run (default: 'AdHoc', max 300 characters) | |
| endpoint_ids | No | Comma-separated list of endpoint UUIDs to target. If omitted, the query runs against all eligible endpoints. |