Skip to main content
Glama

get_anomalies

Retrieve persisted anomaly detection events across memory, hit rate, CPU, and other metrics to investigate alert triggers or correlate anomalies with incidents.

Instructions

Get anomaly detection events from persisted storage. BetterDB continuously runs Z-score analysis on memory, hit rate, CPU, and other metrics — this returns the detected anomalies. On a cluster an event that is about one node names it in node (nodeId, address, role, plus shardId and availabilityZone when known, and collected: false when no connection of the monitor points at that node, so its own metrics are not gathered; connectionId names the connection that collects it). Use to investigate what triggered an alert or correlate with an incident.

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": "get_anomalies"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax events to return
startTimeNoStart time (Unix timestamp ms)
instanceIdNoOptional instance ID override
metricTypeNoFilter by metric type

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.20.2
  2. Removedv0.20.1
  3. Changed1 schema field changedv0.16.0
    • removedInput schema / additionalProperties
      Removed value: -false
  4. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses that events come from persisted storage, that detection is Z-score based across named metrics, and the non-obvious `collected: false` / `connectionId` semantics for cluster nodes whose metrics are not gathered. It omits auth requirements and any volume/retention caveats, which is why it stops short of 5.

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 purpose, then use case, with the dense cluster-node sentence placed in the middle. The single long parenthetical is heavy but earns its place by describing return fields absent an output schema; there is little filler.

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, and the description compensates by explaining the per-event node object and its fields. What remains underspecified is the top-level return shape (array vs. paged envelope) and ordering, minor gaps for a read-only query tool with fully described parameters.

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 description coverage is 100%, so all four parameters (limit, startTime, instanceId, metricType) are already documented in the schema; baseline 3 applies. The description's added detail is about returned node fields, not about parameter meaning or accepted values for metricType, so it contributes nothing beyond the schema here.

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?

Opens with a specific verb and resource ("Get anomaly detection events from persisted storage") and adds what generates those events (continuous Z-score analysis over memory, hit rate, CPU). That scope is distinct from a plain metric reader, so an agent can tell it apart from siblings like get_health or get_memory without opening a schema, though no sibling is named 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?

Provides a clear when-to-use context: "Use to investigate what triggered an alert or correlate with an incident." It gives no explicit when-not or named alternatives (e.g. get_incident_timeline, get_forecast), so routing between overlapping investigation tools is left partly to inference.

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