Grafana / warm
Query Prometheus
Run a bounded PromQL query against a Prometheus datasource configured in Grafana. Defaults to a recent time window when range parameters are omitted.
Quick Start
aweb inspect grafana.query_prometheus
aweb add grafana
aweb plan "use Grafana query prometheus in an agent workflow"import Aweb, { Agent } from '@aweb/sdk';
const aweb = new Aweb({ apiKey: process.env.AWEB_API_KEY });
const agent = new Agent({ tools: aweb.tools });
agent.add('grafana');
const plan = await agent.plan('Use Grafana for this workflow');
const tool = await aweb.tools.inspect('grafana.query_prometheus');
console.log(plan.nextAction);
console.log(tool.inputSchema);Tool Card
Tool idgrafana.query_prometheus
ProviderGrafana (grafana)
Tool namequery_prometheus
Activationwarm
Healthhealthy
Trust score1.00
Transportstreamable_http
Latencynot yet measured
Costunknown
Requirements and Governance
Authstatic_fields
Credentialsetup_required
Workspaceglobal
Approvalnone
RiskREAD
Permissionsread
Credential setup/api/mcp-warehouse/credentials/grafana/init
Schemas
{
"type": "object",
"properties": {
"datasource_uid": {
"type": "string",
"description": "Optional Prometheus datasource UID. Defaults to the warehouse-configured Grafana Cloud Prometheus datasource."
},
"expr": {
"type": "string",
"description": "PromQL expression."
},
"instant": {
"type": "boolean",
"description": "Run an instant query. Default false (range query)."
},
"start": {
"type": "string",
"description": "ISO-8601 or unix timestamp lower bound."
},
"end": {
"type": "string",
"description": "ISO-8601 or unix timestamp upper bound."
},
"step": {
"type": "string",
"description": "Prometheus step duration (for example 60s)."
}
},
"required": [
"expr"
],
"additionalProperties": false
}Examples
[
{
"objective": "Use Grafana query prometheus in an agent workflow.",
"args": {
"datasource_uid": "<datasource_uid>",
"expr": "<expr>",
"instant": "<instant>",
"start": "<start>"
}
}
]