Skip to main content
Glama

Query metrics

cron_query_metrics
Read-onlyIdempotent

Query Prometheus metric samples from cronstable, optionally filtered by metric name, to inspect run outcomes, retries, and SLA breaches across all cron jobs.

Instructions

Parsed samples from the Prometheus /metrics exposition, optionally filtered by metric name. Use it for counters across all jobs, such as run outcomes, retries, and SLA breaches; use cron_get_job_trends for one job's success rate.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cron_query_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMost samples to return (default and maximum 200).
matchNoCase-insensitive substring to match in metric names, such as job_runs_total. Omit it to match every sample.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.2.73
    • addedInput schema / properties / limit / default
      Added value: +200
    • addedInput schema / properties / limit / description
      Added value: +"Most samples to return (default and maximum 200)."
    • addedInput schema / properties / limit / maximum
      Added value: +200
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • addedInput schema / properties / match / description
      Added value: +"Case-insensitive substring to match in metric names, such as job_runs_total. Omit it to match every sample."
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is fully covered. The description adds the useful scope fact that it aggregates across all jobs, but says nothing about what a 'sample' contains (labels? value? timestamp?) or that results can be truncated at the cap.

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?

Two sentences, zero filler, source and scope front-loaded ahead of the sibling routing advice. Every clause earns its place.

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?

No output schema exists, so the description must carry return semantics and it does so at a moderate level ('parsed samples', filterable by name). It would be stronger if it sketched the shape of a returned sample for a metric-scraping tool, but nothing essential to calling it correctly is missing.

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

Parameters3/5

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

Schema coverage is 100% and both parameters (limit, match) are fully documented in the schema, including the default/max of 200 and the substring semantics. The description only echoes the name filter at a high level, adding no format or syntax detail beyond the schema; baseline 3 is correct.

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?

States the specific resource and its origin — parsed samples from the Prometheus /metrics exposition — plus the optional metric-name filter. The verb is implicit in the noun phrase rather than stated, but an agent can tell exactly what comes back and how it differs from cron_get_job_trends.

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?

Names both the use case (counters across all jobs: run outcomes, retries, SLA breaches) and the alternative to pick instead (cron_get_job_trends for one job's success rate). The selection condition is explicit and leaves nothing to inference.

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