Grafana / warm
Query Loki Logs
Run a bounded LogQL query against a Loki datasource configured in Grafana. Returns log lines with stream labels.
Quick Start
aweb inspect grafana.query_loki_logs
aweb add grafana
aweb plan "use Grafana query loki logs 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_loki_logs');
console.log(plan.nextAction);
console.log(tool.inputSchema);Tool Card
Tool idgrafana.query_loki_logs
ProviderGrafana (grafana)
Tool namequery_loki_logs
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 Loki datasource UID. Defaults to the warehouse-configured Grafana Cloud Loki datasource."
},
"query": {
"type": "string",
"description": "LogQL query."
},
"start": {
"type": "string",
"description": "ISO-8601 or unix timestamp lower bound."
},
"end": {
"type": "string",
"description": "ISO-8601 or unix timestamp upper bound."
},
"limit": {
"type": "integer",
"description": "Maximum log lines (default 200, max 1000)."
},
"direction": {
"type": "string",
"enum": [
"backward",
"forward"
],
"description": "Result direction. Default backward."
}
},
"required": [
"query"
],
"additionalProperties": false
}Examples
[
{
"objective": "Use Grafana query loki logs in an agent workflow.",
"args": {
"datasource_uid": "<datasource_uid>",
"query": "<query>",
"start": "<start>",
"end": "<end>"
}
}
]