query-datasource
Run instant or range queries against any Grafana datasource by providing datasource UID and query objects.
Instructions
Run an instant or range query against a datasource using Grafana's ds/query endpoint.
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": {
"datasourceUid": "<datasourceUid>",
"queries": "<queries>"
},
"name": "query-datasource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of time range | now |
| from | No | Start of time range, e.g. 'now-1h' or epoch ms | now-1h |
| queries | Yes | Array of query objects (datasource-specific format) | |
| datasourceUid | Yes | UID of the datasource to query |