results
Loki query results from queryloki
How to use it
results is exposed by the Grafana Loki MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the results tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Grafana Loki MCP
pip install grafana-loki-mcpOther tools in Grafana Loki MCP (12)
Query direction ('forward' or 'backward', default: 'backward')
End time (ISO format, Unix timestamp, or Grafana-style relative time like 'now', default: now)
Format Loki query results in a more readable format.
Output format ('text', 'json', or 'markdown', default: 'text')
Get values for a specific label from Loki.
Get all label names from Loki.
Label name
Maximum number of log lines to return (default: 100)
Maximum characters per log line (0 for unlimited, default: 100)
Loki query string
Query Loki logs through Grafana.
Start time (ISO format, Unix timestamp, or Grafana-style relative time like 'now-1h', default: 1 hour ago)