Skip to main content
Glama
Cloady

Cloady

Official
by Cloady

Query App Metrics Range

queryAppMetricsRange
Read-only

Runs a PromQL query across a time range on an app's own metrics retained for 62 days and returns Prometheus matrix results unchanged for dashboards, alerts, or performance analysis.

Instructions

Runs a PromQL query at every step of a range against the app's own metrics, kept for 62 days, and returns Prometheus's answer unchanged: one matrix series per label set. Only the app's series are visible. The labels and series are queryAppMetrics'. A query the store refuses comes back with the store's own status and error. The path is the store's own, so a Grafana data source can point here too.

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": {
      "workspaceSlug": "<workspaceSlug>",
      "appSlug": "<appSlug>",
      "query": "<query>",
      "start": "<start>",
      "end": "<end>",
      "step": "<step>"
    },
    "name": "queryAppMetricsRange"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYesEnd of the range, as Unix seconds or RFC 3339
envNo
stepYesSeconds between points, or a duration such as `5m`; at most 11,000 points per series
queryYesA PromQL expression
startYesStart of the range, as Unix seconds or RFC 3339
regionNo
appSlugYes
workspaceSlugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.0

TDQS

A3.5/5.0
Behavior4/5

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

Beyond the read-only and open-world annotations, the description discloses retention (62 days), the exact response shape (one matrix series per label set), error behavior (store status plus error), and the fact that only app series are visible. This is substantial behavioral context, though it does not cover pagination or rate limits beyond what the schema says about step size.

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

Conciseness4/5

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

The core action is front-loaded in the first sentence, and the remaining sentences add useful context about retention, output shape, errors, and Grafana compatibility. It is slightly dense but appropriately sized for a tool with eight parameters and no output schema.

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

Completeness4/5

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

For a complex query tool with no output schema, the description covers the return shape, retention window, visibility scope, and error handling well. The main gap is that env and region are not explained anywhere, which leaves some ambiguity for an eight-parameter tool.

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

Parameters2/5

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

Schema coverage is 50%: start, end, step, and query are documented in the schema, while env, region, appSlug, and workspaceSlug are not. The description adds little parameter meaning beyond repeating that the query runs against the app's own metrics, and it does not explain how env or region affect the query.

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

Purpose4/5

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

The description clearly states a specific verb and resource: it runs a PromQL range query against the app's own metrics and returns a Prometheus matrix. The 'range' and 'every step' phrasing distinguishes it from an instant sibling like queryAppMetrics, though it does not explicitly name that sibling.

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

Usage Guidelines3/5

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

Usage is implied by the range/step mechanics and the note that only the app's series are visible, but the description never states when to choose this tool over queryAppMetrics, streamAppMetrics, or queryWorkspaceMetrics. There are no explicit exclusions or alternatives.

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

Deploy Server

Other Tools