Skip to main content
Glama

Metric anomalies

find_anomalies
Read-onlyIdempotent

Anomalies versus the median of the same weekdays over 4 weeks, with campaign contributions.

Input Schema

NameRequiredDescriptionDefault
date_toNoPeriod end, YYYY-MM-DD, no later than yesterday; up to 31 days. Optional: by default yesterday (the account's time zone when known, otherwise UTC).
date_fromNoPeriod start, YYYY-MM-DD, a completed day. Optional: without dates the last 7 completed days are used (date_from = date_to − 6 days).
account_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / date_from / description
      Previous value: -"Period start, YYYY-MM-DD, a completed day"New value: +"Period start, YYYY-MM-DD, a completed day. Optional: without dates the last 7 completed days are used (date_from = date_to − 6 days)."
    • changedInput schema / properties / date_to / description
      Previous value: -"Period end, YYYY-MM-DD, no later than yesterday; up to 31 days"New value: +"Period end, YYYY-MM-DD, no later than yesterday; up to 31 days. Optional: by default yesterday (the account's time zone when known, otherwise UTC)."
    • changedInput schema / required
      Previous value: -[
      -  "account_id",
      -  "date_from",
      -  "date_to"
      -]New value: +[
      +  "account_id"
      +]
  2. First observed

TDQS

C2.6/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuine method context not present in structured fields: the 4-week same-weekday median baseline and inclusion of campaign contributions. It stops short of saying what counts as an anomaly (threshold, significance) or how results are ordered, which matters for interpreting the output.

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

Conciseness3/5

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

One short sentence with no wasted words, and the key concept (baseline method) is front-loaded. But the terseness comes at the cost of specification rather than serving conciseness — it is a fragment, not a complete statement of behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only analytical tool with no output schema and an incompletely documented parameter set, the description should explain what an anomaly looks like in the response and how campaign contributions are attributed. As written, an agent cannot predict the shape or meaning of the result before calling it.

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

Parameters2/5

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

Schema coverage is 67%: date_from and date_to are well documented in the schema, but account_id has no description at all. The description contributes nothing about parameters — it does not restate the default 7-day window, the 31-day cap, or the account scoping, so the undocumented parameter is left entirely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource (anomalies) and gives the detection method (deviation from the median of the same weekdays across 4 weeks, plus campaign contributions), which is more than a restatement of the name. However, it is a noun-phrase fragment with no verb and no statement of what the tool actually returns (a list of flagged days? a ranked table?). It also fails to distinguish it from close siblings like find_waste or compare_periods, which an agent could easily confuse with anomaly detection.

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

Usage Guidelines2/5

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

There is no guidance on when to call this over alternatives such as compare_periods, get_performance, or find_waste, and no conditions or prerequisites are stated. The statistical method hints at the use case but the agent must infer that anomaly screening is the intent.

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