Skip to main content
Glama
mcp-aws-finops

mcp-aws-finops

by thomm-011

explain_anomaly

Explain a cost spike or dip on a given day versus a trailing baseline, returning the actual cost, baseline average, and services that drove the biggest difference.

Instructions

Explain a cost spike/dip on a given day vs. a trailing baseline.

    Args:
        day: ISO date to explain, e.g. "2025-08-25".
        baseline_window_days: How many days before `day` to average as
            the baseline (1-60). Defaults to 14.
        threshold_pct: Percent deviation from baseline above which the
            day is flagged `is_anomaly=True`. Defaults to 30%.

    Returns the day's actual cost, the baseline average, and the
    services that contributed most to the difference.
    

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": {
      "day": "<day>"
    },
    "name": "explain_anomaly"
  }
}

Input Schema

NameRequiredDescriptionDefault
dayYes
threshold_pctNo
baseline_window_daysNo

Output Schema

NameRequiredDescriptionDefault
dateYes
deltaYes
currencyYes
delta_pctYes
is_anomalyYesTrue if delta exceeds the anomaly threshold
actual_costYes
contributorsYes
baseline_costYes
baseline_window_daysYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does well on the analytic contract: it states that the day is flagged is_anomaly above the threshold and lists the returned fields. It does not state that the operation is read-only, whether cost data is complete for recent days, or what units/currency are used.

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?

The purpose sentence is front-loaded and the Args block is easy to scan. Defaults are repeated from the schema's explicit default values, which is mild redundancy but not harmful, and nothing else is wasted.

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?

An output schema exists, yet the description still summarizes the return content (actual cost, baseline average, top contributing services), which is helpful rather than harmful. For a three-parameter analytic tool with no annotations, this is nearly complete, with only timezone/currency and data-freshness caveats 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 0%, so the description must compensate, and it largely does: each of the three parameters gets a meaning, a format example ('2025-08-25'), a valid range (1-60), a default, and for threshold_pct the effect on the is_anomaly flag. It stops short of edge details such as timezone and how partial/current days are handled.

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+resource: 'Explain a cost spike/dip on a given day vs. a trailing baseline.' The trailing-baseline framing implicitly separates it from compare_periods and top_cost_drivers, but no sibling is named, so the distinction is left for the agent to infer.

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

Usage Guidelines3/5

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

Usage is implied by the day-vs-baseline framing and the threshold explanation, so an agent can guess when it applies. However, there is no explicit when-to-use/when-not guidance and no named alternative (e.g. compare_periods for two fixed windows), which is the main gap.

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