Query a Grafana data source
query_datasourceRun read-only queries against Grafana data sources via the native plugin API. Define query objects with datasource UID and time range to fetch metrics and logs.
Instructions
Run bounded, read-only native plugin queries through Grafana's data source query API.
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": {
"queries": "<queries>"
},
"name": "query_datasource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queries | Yes | Grafana /api/ds/query query objects; include refId and datasource.uid | |
| to_time | No | End time, e.g. now or epoch milliseconds | now |
| from_time | No | Start time, e.g. now-1h or epoch milliseconds | now-1h |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||