Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

Datadog Metrics Query

dd_metrics_query
Read-only

Query Datadog metrics timeseries via /api/v1/query. Use for CPU, latency, error-rate spikes. Example: avg:trace.servlet.request.errors{service:edge}. from/to accept now-1h, now-14h30m, ISO-8601, or epoch.

Input Schema

NameRequiredDescriptionDefault
toNoEnd window: now, ISO-8601, or epoch (default now)
fromNoStart window: now-1h, now-14h30m, ISO-8601, or epoch (default now-1h)
queryYesDatadog metrics query expression
context_idNoOptional explicit Connection Hub work context (ctx_*). Omit to use the conversation's active workspace; global Hub tools ignore it.

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
contractVersionYes
dataSchemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"Start window, e.g. now-1h (default)"New value: +"Start window: now-1h, now-14h30m, ISO-8601, or epoch (default now-1h)"
    • changedInput schema / properties / to / description
      Previous value: -"End window, e.g. now (default)"New value: +"End window: now, ISO-8601, or epoch (default now)"
  2. Changed5 schema fields changed
    • changedOutput schema / properties / data / additionalProperties
      Previous value: -trueNew value: +false
    • changedOutput schema / properties / data / properties / series / items / additionalProperties
      Previous value: -trueNew value: +{
      +  "type": [
      +    "string",
      +    "number",
      +    "boolean",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / data / properties / series / items / properties
      Removed value: -{}
    • addedOutput schema / properties / dataSchemaVersion
      Added value: +{
      +  "const": 2,
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "contractVersion",
      -  "ok",
      -  "data"
      -]New value: +[
      +  "contractVersion",
      +  "dataSchemaVersion",
      +  "ok",
      +  "data"
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds useful operational context — the API route and the accepted time-window formats — but says nothing about auth requirements, rate limits, or datapoint/rollup behavior, which matters for a metrics API.

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

Conciseness5/5

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

Three tight sentences: purpose and endpoint first, use cases second, then an example and time-format note. No filler, nothing buried.

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?

An output schema exists, so return values need no explanation, and annotations cover safety. The description is close to complete, but as a timeseries tool it omits anything about rollup/granularity or result-size limits that would affect how an agent phrases the query.

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 the baseline is 3. The description earns an increment by supplying a concrete query expression example for the required `query` param, which the terse schema text ('Datadog metrics query expression') does not; the from/to format list largely duplicates the schema, and context_id is untouched in the description but documented in schema.

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 opens with a specific verb and resource ('Query Datadog metrics timeseries') and even names the underlying endpoint (/api/v1/query). It implicitly separates itself from the Prometheus siblings (prom_query/prom_query_range) by naming Datadog, but never states that distinction explicitly.

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?

'Use for CPU, latency, error-rate spikes' gives a clear signal of the intended scenarios, and the example query pins down the expression dialect. It stops short of exclusions or naming alternatives such as prom_query or dd_apm_traces_search for trace-level investigation.

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