Skip to main content
Glama
aws-cost-mcp

aws-cost-mcp

Compare AWS cost between two periods

compare_periods
Read-onlyIdempotent

Compare AWS costs between two periods by service, account, region, usage type, or tag to identify what drove cost increases or decreases, ranked by absolute change.

Instructions

Diff AWS cost between two periods per service, account, region, usage type or tag, ranked by absolute change. Use it to find what drove a rise or drop. With no dates it compares month-to-date against the equally long period right before it.

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

Input Schema

NameRequiredDescriptionDefault
formatNomarkdown: compact table for reading. json: structured data.markdown
metricNoCost metric. Use AmortizedCost to spread Savings Plans / RI upfront fees.UnblendedCost
tagKeyNoCost allocation tag key to group by, e.g. `team`. Only with groupBy TAG.
groupByNoWhat to break the cost down by. TAG requires `tagKey`.SERVICE
currentEndNoDay after the current period's last day, exclusive. At most tomorrow (UTC).
previousEndNoDay after the previous period's last day, exclusive (YYYY-MM-DD).
currentStartNoFirst day of the current period, inclusive (YYYY-MM-DD).
previousStartNoFirst day of the period to compare against, inclusive (YYYY-MM-DD).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds genuinely new behavior: results are ranked by absolute change, and omitting dates yields a month-to-date vs. preceding equal-length window. It still says nothing about result limits or truncation for large groupings.

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?

Three sentences, front-loaded with the operation and grouping dimensions, followed by the use case and the default-window rule. No filler or repetition of schema detail.

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?

For an 8-parameter tool with full schema descriptions and an explicit default-window rule, the definition covers the essentials an agent needs to invoke it correctly. Only the shape of returned rankings and any cardinality limits go unmentioned, and no output schema exists to cover them.

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%, so the enum meanings are already documented, but the description adds meaning the schema lacks: the default comparison window when currentStart/previousStart are omitted (all params are optional). It adds some value beyond a baseline 3.

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 a specific verb and resource ("Diff AWS cost between two periods") plus the grouping dimensions, so the operation is unambiguous. It does not name or distinguish itself from siblings like get_cost_breakdown, so it lands at 4 rather than 5.

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?

"Use it to find what drove a rise or drop" gives a clear use context, and the no-dates clause tells the agent when the defaults kick in. There are no explicit exclusions or named alternatives to steer the agent away from get_cost_breakdown.

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