query_range
Evaluate a PromQL query in a range of time
This record as markdown: /tools/com-googleapis-monitoring-mcp/query-range.md
What query_range does on Mcp
AI agents call query_range to retrieve information from Mcp without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
end | string | — | The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. |
name | string | Yes | Required. The project on which to execute the request. Data associcated with the project's workspace stored under the The format is: projects/[PROJECT_ID_OR_NUM |
step | string | — | The resolution of query result. Either a Prometheus duration string (https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) or floating p |
query | string | — | A PromQL query string. Query language documentation: https://prometheus.io/docs/prometheus/latest/querying/basics/. |
start | string | — | The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. |
timeout | string | — | An upper bound timeout for the query. Either a Prometheus duration string (https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) or floa |
location | string | — | Location of the resource information. Has to be "global" now. |
Parameters from the server's own tool schema.
Why query_range is rated Low
PromQL is used to retrieve and analyze time-series metrics data without modifying or deleting it. However, PromQL queries can be resource-intensive and could be abused to cause denial-of-service against the monitoring backend, warranting medium severity rather than low. This is Read (not Execute) because PromQL is a declarative query language, not arbitrary code execution. No financial or destructive impact.
From the tool's definition Tool name 'query_range' and description 'Evaluate a PromQL query in a range of time' indicate data retrieval via PromQL (Prometheus Query Language). The context of monitoring/observability confirms this is a read operation querying metrics.
Attacks that exploit this kind of access
The rule that runs query_range safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For query_range, this is the rule to start with:
query_range is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp, apply this rule, and every query_range call is checked against it from then on.
Questions about query_range
Evaluate a PromQL query in a range of time. It is categorised as a Read tool in the Mcp MCP Server, which means it retrieves data without modifying state.
query_range accepts 7 parameters: end, name, step, query, start, timeout, location. Required: name. The full parameter table on this page comes from the server's own tool schema.
Register the MCP server in PolicyLayer and add a rule for query_range: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp. Nothing to install.
query_range is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the query_range rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for query_range. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
query_range is provided by the MCP server (https://monitoring.googleapis.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on , and thousands of servers like it.
This server
Across the catalogue