Skip to main content
Glama

Metric History

metrics_history
Read-onlyIdempotent

Retrieve recent CPU, memory, or network history from the server's in-memory recorder to inspect up to 24 hours of 30-second min/avg/max trends; recording must be enabled.

Instructions

Read-only. Recent CPU / memory / network history from this server's in-memory recorder (opt-in: MCP_METRICS_HISTORY=true): 30-second buckets with min/avg/max for up to 24 hours, honest about gaps; concise output folds the window into at most 24 rows. Nothing is persisted to disk — history starts when the server starts. When recording is off the tool says how to enable it. For current values rather than a trend, use system_metrics.

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": {
      "topic": "<topic>"
    },
    "name": "metrics_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
topicYesSeries to return: cpu (percent), memory (percent, usedBytes), or network (rx/tx bytes per second summed over interfaces).
window_minutesNoHow far back to look, in minutes; the maximum is the recorder's 24-hour retention.
response_formatNo`detailed` returns full JSON instead of readable text.concise

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.3
    • addedInput schema / properties / response_format / description
      Added value: +"`detailed` returns full JSON instead of readable text."
    • addedInput schema / properties / topic / description
      Added value: +"Series to return: cpu (percent), memory (percent, usedBytes), or network (rx/tx bytes per second summed over interfaces)."
    • addedInput schema / properties / window_minutes / description
      Added value: +"How far back to look, in minutes; the maximum is the recorder's 24-hour retention."
  2. First observedv0.1.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds substantial context beyond them: opt-in env flag, 30-second buckets with min/avg/max, 24-hour retention, gaps reported honestly, nothing persisted to disk, and history resetting at server start. The only minor gap is that it doesn't state approximate latency or cost of querying a long window with detailed format.

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?

Front-loaded with the safety hint and the core purpose, and every clause carries information. It is dense — parentheticals and em dashes stack several ideas — but nothing is filler.

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?

With no output schema, the description still tells the agent the return shape (bucketed min/avg/max series, folded to at most 24 rows in concise mode) and the failure mode when recording is off. Nothing needed to call it correctly is missing.

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% and both enums are self-describing, so baseline would be 3; the description earns extra by tying response_format to a concrete effect ('concise output folds the window into at most 24 rows') and reinforcing the 24-hour ceiling behind window_minutes. That gives an agent the practical consequence of each parameter choice, not just its type.

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 ('Recent CPU / memory / network history from this server's in-memory recorder') and immediately contrasts with the sibling system_metrics. An agent can distinguish trend history from current snapshots without opening the 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?

Explicitly names the alternative and the condition that selects it ('For current values rather than a trend, use system_metrics'). It also covers the prerequisite/opt-in path, telling the agent what happens when recording is disabled and how to enable it.

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