# query_range

Evaluate a PromQL query in a range of time

Agent View of the PolicyLayer registry record for `query_range`. HTML page: https://policylayer.com/tools/com-googleapis-monitoring-mcp/query-range

## Facts

- Tool: `query_range`
- Server: Mcp (`https://monitoring.googleapis.com/mcp`) — https://policylayer.com/tools/com-googleapis-monitoring-mcp.md
- Homepage: https://github.com/https://monitoring.googleapis.com/mcp
- Risk category: Read (Low risk)
- Registry record: grade C, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 7 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `end` | string | no | 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 | no | 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 | no | A PromQL query string. Query language documentation: https://prometheus.io/docs/prometheus/latest/querying/basics/. |
| `start` | string | no | The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. |
| `timeout` | string | no | 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 | no | Location of the resource information. Has to be "global" now. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "query_range",
    "arguments": {
      "name": "<name>"
    }
  }
}
```

## 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 own 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."

## Use case

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.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "query_range": {}
  }
}
```

## Other tools on Mcp (8)

- `get_alert` — Read — https://policylayer.com/tools/com-googleapis-monitoring-mcp/get-alert.md
- `get_alert_policy` — Read — https://policylayer.com/tools/com-googleapis-monitoring-mcp/get-alert-policy.md
- `get_dashboard` — Read — https://policylayer.com/tools/com-googleapis-monitoring-mcp/get-dashboard.md
- `list_alert_policies` — Read — https://policylayer.com/tools/com-googleapis-monitoring-mcp/list-alert-policies.md
- `list_alerts` — Read — https://policylayer.com/tools/com-googleapis-monitoring-mcp/list-alerts.md
- `list_dashboards` — Read — https://policylayer.com/tools/com-googleapis-monitoring-mcp/list-dashboards.md
- `list_metric_descriptors` — Read — https://policylayer.com/tools/com-googleapis-monitoring-mcp/list-metric-descriptors.md
- `list_timeseries` — Read — https://policylayer.com/tools/com-googleapis-monitoring-mcp/list-timeseries.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-googleapis-monitoring-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-googleapis-monitoring-mcp
