run_nrql
Run NRQL queries against New Relic accounts to retrieve events, metrics, logs, or spans. Use for custom observability data when dedicated tools don't fit.
Instructions
Run a NRQL query against one or more New Relic accounts.
This is the general-purpose data tool: anything stored as events, metrics, logs or spans can be reached from here. Prefer the dedicated tools (search_logs, get_trace, get_recent_errors) when they fit, because they return a shape tuned for that use case.
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": {
"query": "<query>"
},
"name": "run_nrql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | NRQL query. SINCE and LIMIT are added when absent. | |
| account_ids | No | Accounts to query. Defaults to the configured ones. | |
| timeout_seconds | No | Server-side NRQL timeout. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |