Skip to main content
Glama
io.github.ryanmat/logicmonitor

io.github.ryanmat/logicmonitor

by ryanmat

query_otlp_metrics

Read-onlyIdempotent

Run PromQL queries against native OTLP metrics to fetch current values or time-series samples for monitoring and troubleshooting.

Instructions

Run a PromQL query against native OTLP metrics. A range query (start and end in epoch seconds, optional step) returns each series' samples over the window; instant=true returns each series' value now and takes no window. Returns at most 20 series and 500 points a series, downsampled; for statistics on a series use analyze_metric(source="otlp")

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": {
      "query": "<query>"
    },
    "name": "query_otlp_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoWindow end, unix epoch seconds; range queries only
stepNoResolution step, e.g. '30s', '5m', '1h'; range queries only; use larger steps for wider windows
queryYesPromQL expression. Examples: container_memory_usage_bytes (raw series), avg(container_cpu_usage_seconds_total) (aggregate), rate(container_network_receive_bytes_total[5m]) (per-second rate), nginx_up{service_name="api"} (label matcher). Discover names and labels with get_otlp_metric_names / get_otlp_metric_labels
startNoWindow start, unix epoch seconds; range queries only. Keep windows under ~30 days; very wide windows fail in the metrics backend
instantNoRead each series' value now instead of a range

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv5.0.1
    • changedInput schema / properties / end / description
      Previous value: -"Window end, unix epoch seconds"New value: +"Window end, unix epoch seconds; range queries only"
    • addedInput schema / properties / instant
      Added value: +{
      +  "default": false,
      +  "description": "Read each series' value now instead of a range",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / start / description
      Previous value: -"Window start, unix epoch seconds. Keep windows under ~30 days; very wide windows fail in the metrics backend"New value: +"Window start, unix epoch seconds; range queries only. Keep windows under ~30 days; very wide windows fail in the metrics backend"
    • changedInput schema / properties / step / description
      Previous value: -"Resolution step, e.g. '30s', '5m', '1h'; use larger steps for wider windows"New value: +"Resolution step, e.g. '30s', '5m', '1h'; range queries only; use larger steps for wider windows"
    • changedInput schema / required
      Previous value: -[
      -  "query",
      -  "start",
      -  "end"
      -]New value: +[
      +  "query"
      +]
  2. First observedv4.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description is free to spend its words on behavior the annotations cannot express: a hard cap of 20 series and 500 points per series, downsampling, and the fact that very wide windows (over ~30 days) fail in the metrics backend. Those limits and failure modes materially change how an agent should construct a query.

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 sentences, all front-loaded: what it does, how the two modes differ, then the result caps and the escape hatch to analyze_metric. No restatement of the name or filler, and the routing hint sits at the end where it is most useful after the limits are known.

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?

There is no output schema, but the description covers the return shape itself — per-series samples over the window or a single current value, with explicit series and point ceilings and downsampling. Combined with the failure note on wide windows, an agent has everything needed to call this correctly and interpret what comes back.

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 above that by explaining the interaction between parameters that the schema documents only in isolation — that instant mode takes no window, and that start/end/step apply to range queries only. It does not add format guidance for step beyond the schema's own examples, keeping it short of a 5.

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 query against native OTLP metrics. It immediately distinguishes itself from the sibling by naming analyze_metric(source="otlp") as the tool for statistics rather than raw series, so an agent can route correctly without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit mode selection: a range query with start/end (optional step) versus instant=true, which 'takes no window'. It also names the alternative for a different need ('for statistics on a series use analyze_metric'), which is a concrete when-to-use-else rule rather than an implied one.

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