Skip to main content
Glama

Monitoring query

monitoring_query
Read-only

Run a PromQL query over a range on a project's monitoring — its Grafana's Prometheus data source (get_monitoring) — as a dashboard does: each series with its labels, min, max, avg, last and its points. At most 31 days, 300 points a series (a step that gives more is widened, and a note says so), 30 series (aggregate with sum by / avg by (host)); points are left out past 2000 in one answer, the summaries still over all of them. 'source' says the Grafana, the data source, when it was asked and the period counted. The labels are the monitoring's own: read them off monitoring_dashboards' queries or monitoring_hosts' before guessing. For the people who work in the project and the company; at most 60 reads of a project's monitoring an hour, agents and people together. A refusal has a 'state': not_connected (with the 'url' of the screen that connects one), off, refused, sealed, unreachable, busy, too_big, missing, no_access, not_found, bad_request.

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": {
      "project": "<project>",
      "promql": "<promql>"
    },
    "name": "monitoring_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoThe end of the range, ISO 8601, e.g. '2026-11-20T09:00:00Z'. Default now.
stepNoThe step: '30s', '5m', '1h'. Default about 120 points over the range.
rangeNoHow far back from 'end': '30m', '6h', '1d', '7d'. Default '1h', at most '31d'.
promqlYesThe PromQL expression, e.g. 'avg by (host) (node_load1)'.
projectYesProject key, e.g. 'PM'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes far beyond readOnlyHint/openWorldHint: caps of 31 days, 300 points per series, 30 series, step widening with a note, points dropped past 2000 while summaries still cover all data, plus an explicit rate limit of 60 monitoring reads per project per hour shared by agents and people. Refusal taxonomy with a 'state' field and enumerated values (not_connected with a connecting url, off, refused, sealed, unreachable, busy, too_big, missing, no_access, not_found, bad_request) tells the agent exactly how failure surfaces.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and hard limits are front-loaded and nearly every clause carries information, but the prose is a comma-spliced wall of text ('its Grafana's Prometheus data source', 'the summaries still over all of them') that is harder to parse than the content warrants. A short bulleted limits block would preserve the same content with less friction.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on the return-shape burden and does: per-series labels, min, max, avg, last, points, plus a 'source' block naming the Grafana, data source, ask time and period counted, and the full refusal state list. Nothing an agent needs to call this correctly or interpret the result appears to be missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds operational meaning the schema doesn't: it explains the consequence of 'step' (widened when it would exceed 300 points, with a note), reinforces the 31-day 'range' ceiling, and gives a concrete remedy for the 30-series cap via aggregation in 'promql' (sum by / avg by (host)). It does not add syntax detail for 'end' or 'project', which the schema already covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (run a PromQL range query over a project's monitoring) and anchors it to the sibling that configures the data source (get_monitoring). The 'as a dashboard does' framing plus the listed per-series shape makes it unmistakable against monitoring_dashboards or monitoring_hosts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tells the agent to read label names off monitoring_dashboards' queries or monitoring_hosts' before guessing, which is real when-and-how guidance, and implies get_monitoring is for the data source rather than queries. No explicit when-not-to-use or an explicit statement of what to use instead for a single instant value.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources