run_query
Execute Live Discover osquery SQL queries across up to 50 Sophos Central endpoints to investigate threats in real time and hunt for suspicious activity.
Instructions
Execute a Live Discover SQL query (osquery) on one or more Sophos Central endpoints — for real-time investigation and threat hunting
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>",
"endpoint_ids": "<endpoint_ids>"
},
"name": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL query to execute on endpoints (osquery syntax). Example: SELECT pid, name, path FROM processes WHERE name LIKE '%suspicious%' | |
| variables | No | Query variables as key-value pairs for parameterized queries | |
| endpoint_ids | Yes | Array of endpoint UUIDs to run the query on (1-50 endpoints) |