Skip to main content
Glama
mcp-aws-finops

mcp-aws-finops

by thomm-011

cost_by_tag

Break down AWS costs by values of a chosen cost-allocation tag over a date range, and report untagged spend and its percentage for showback and FinOps hygiene.

Instructions

Break down cost by the values of one cost-allocation tag (showback).

    Args:
        tag_key: Tag key to group by, e.g. "team" or "project".
        start: ISO date (inclusive).
        end: ISO date (exclusive).

    Also reports the cost and percentage of spend with no value for
    this tag ("untagged"), which is a common FinOps hygiene metric.
    

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": {
      "tag_key": "<tag_key>",
      "start": "<start>",
      "end": "<end>"
    },
    "name": "cost_by_tag"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYes
startYes
tag_keyYes

Output Schema

NameRequiredDescriptionDefault
endYes
startYes
groupsYes
tag_keyYes
currencyYes
total_costYes
untagged_pctYes
untagged_costYes

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 usefully discloses a behavior beyond the schema: an extra "untagged" bucket with cost and percentage of spend. It still says nothing about permissions, rate limits, empty-result behavior, or units/currency of the returned costs.

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 core purpose, then the Args block, then the notable untagged behavior. The docstring-style Args section duplicates parameter names but carries real semantics, so almost every sentence earns its place; slight redundancy with the schema property names.

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?

With an output schema present, return values need not be described, and the description correctly focuses on the one output nuance that matters (the untagged bucket). For a three-param read tool it is nearly complete; only units/currency of the cost figures and no-data handling are absent.

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 description coverage is 0%, so the description must compensate, and it does: tag_key is explained with concrete examples ("team", "project"), and start/end are given ISO format plus inclusive/exclusive boundary semantics that the bare schema does not convey. Remaining gap is minor format detail (timezone/offset handling).

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?

The opening sentence pairs a concrete verb ("break down") with a specific resource (cost by cost-allocation tag values) and names the use case (showback). It is unambiguous what the tool returns, though it never explicitly contrasts itself with siblings like get_cost_summary or top_cost_drivers.

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 only implied: the tag_key/start/end signature and the "showback" label suggest when it applies, and the untagged metric is framed as a FinOps hygiene use case. There is no explicit statement of when to prefer it over get_cost_summary or top_cost_drivers, and no exclusions or prerequisites.

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