Skip to main content
Glama

Costory: Your Finops MCP

suggest_groupby

Read-only

Suggest the best dimensions to group costs by, based on an optional filterCel (CEL). Call this when the user asks "what should I look at?" or when you need columns for query or find_cost_change_factors. Prefer datePreset over from/to. Omit compare for current-window ranking. Pass compare ({} auto-derives, or { from, to }) when the user asks what changed — then pass 2–4 of the returned column names (max 8; { column, contains } for token columns, dropping metrics) into find_cost_change_factors. Returns { column } or { column, contains } plus metrics; do not invent columns. filterCel omitted or "" is unfiltered (not AWS-only). filterCel supports == null for unlabelled dimension values (e.g. cos_environment == null). EXAMPLES: • "What should I split last month's EC2 cost by?" → { datePreset: "LAST_MONTH", filterCel: "cos_service_name in ["AmazonEC2"]" } • "Costs of EC2 spiked last month, what should I investigate?" → { datePreset: "LAST_MONTH", compare: {}, filterCel: "cos_service_name in ["AmazonEC2"]" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoCurrent period end (YYYY-MM-DD), inclusive. Omit when using datePreset.
fromNoCurrent period start (YYYY-MM-DD). Omit when using datePreset.
slugNoOrganization slug. Omit to auto-detect from your account (fails if you belong to multiple orgs).
compareNoOptional reference (previous) period. Omit for current-window ranking. `{}` auto-derives from the current window (same helper as query). `{ from, to }` pins it. Prefer passing this when the user asks what changed, before find_cost_change_factors.
filterCelNoOptional CEL scope. Omit or "" for unfiltered (Billy where_clause TRUE). That is not an AWS-only filter even though columns_where_clause falls back to ["cos_provider"].
datePresetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / datePreset / enum
      Previous value: -[
      -  "TRAILING_90_DAYS",
      -  "TRAILING_30_DAYS",
      -  "TRAILING_45_DAYS",
      -  "TRAILING_7_DAYS",
      -  "TRAILING_3_DAYS",
      -  "TRAILING_14_WEEKS",
      -  "MTD",
      -  "QTD",
      -  "YTD",
      -  "CURRENT_MONTH",
      -  "CURRENT_QUARTER",
      -  "CURRENT_YEAR",
      -  "LAST_WEEK",
      -  "LAST_MONTH",
      -  "LAST_6_MONTHS",
      -  "LAST_12_MONTHS",
      -  "LAST_4_YEARS",
      -  "LAST_3_MONTHS",
      -  "LAST_INVOICE_MONTH"
      -]New value: +[
      +  "TRAILING_90_DAYS",
      +  "TRAILING_30_DAYS",
      +  "TRAILING_45_DAYS",
      +  "TRAILING_7_DAYS",
      +  "TRAILING_3_DAYS",
      +  "TRAILING_1_DAYS",
      +  "TRAILING_14_WEEKS",
      +  "MTD",
      +  "QTD",
      +  "YTD",
      +  "CURRENT_MONTH",
      +  "CURRENT_QUARTER",
      +  "CURRENT_YEAR",
      +  "LAST_WEEK",
      +  "LAST_MONTH",
      +  "LAST_6_MONTHS",
      +  "LAST_12_MONTHS",
      +  "LAST_4_YEARS",
      +  "LAST_3_MONTHS",
      +  "LAST_INVOICE_MONTH"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / datePreset / enum
      Previous value: -[
      -  "TRAILING_90_DAYS",
      -  "TRAILING_30_DAYS",
      -  "TRAILING_45_DAYS",
      -  "TRAILING_7_DAYS",
      -  "TRAILING_3_DAYS",
      -  "TRAILING_14_WEEKS",
      -  "MTD",
      -  "QTD",
      -  "YTD",
      -  "LAST_WEEK",
      -  "LAST_MONTH",
      -  "LAST_6_MONTHS",
      -  "LAST_12_MONTHS",
      -  "LAST_4_YEARS",
      -  "LAST_3_MONTHS",
      -  "LAST_INVOICE_MONTH"
      -]New value: +[
      +  "TRAILING_90_DAYS",
      +  "TRAILING_30_DAYS",
      +  "TRAILING_45_DAYS",
      +  "TRAILING_7_DAYS",
      +  "TRAILING_3_DAYS",
      +  "TRAILING_14_WEEKS",
      +  "MTD",
      +  "QTD",
      +  "YTD",
      +  "CURRENT_MONTH",
      +  "CURRENT_QUARTER",
      +  "CURRENT_YEAR",
      +  "LAST_WEEK",
      +  "LAST_MONTH",
      +  "LAST_6_MONTHS",
      +  "LAST_12_MONTHS",
      +  "LAST_4_YEARS",
      +  "LAST_3_MONTHS",
      +  "LAST_INVOICE_MONTH"
      +]
  3. Changed10 schema fields changed
    • addedInput schema / properties / compare
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional reference (previous) period. Omit for current-window ranking. `{}` auto-derives from the current window (same helper as query). `{ from, to }` pins it. Prefer passing this when the user asks what changed, before find_cost_change_factors.",
      +  "properties": {
      +    "from": {
      +      "format": "date",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      +      "type": "string"
      +    },
      +    "to": {
      +      "format": "date",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / datePreset
      Added value: +{
      +  "enum": [
      +    "TRAILING_90_DAYS",
      +    "TRAILING_30_DAYS",
      +    "TRAILING_45_DAYS",
      +    "TRAILING_7_DAYS",
      +    "TRAILING_3_DAYS",
      +    "TRAILING_14_WEEKS",
      +    "MTD",
      +    "QTD",
      +    "YTD",
      +    "LAST_WEEK",
      +    "LAST_MONTH",
      +    "LAST_6_MONTHS",
      +    "LAST_12_MONTHS",
      +    "LAST_4_YEARS",
      +    "LAST_3_MONTHS",
      +    "LAST_INVOICE_MONTH"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / filterCel / description
      Previous value: -"Optional CEL filter to scope the suggestion (same as query)."New value: +"Optional CEL scope. Omit or \"\" for unfiltered (Billy where_clause TRUE). That is not an AWS-only filter even though columns_where_clause falls back to [\"cos_provider\"]."
    • changedInput schema / properties / from / description
      Previous value: -"Start date (YYYY-MM-DD)"New value: +"Current period start (YYYY-MM-DD). Omit when using datePreset."
    • addedInput schema / properties / from / format
      Added value: +"date"
    • addedInput schema / properties / from / pattern
      Added value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    • changedInput schema / properties / to / description
      Previous value: -"End date (YYYY-MM-DD)"New value: +"Current period end (YYYY-MM-DD), inclusive. Omit when using datePreset."
    • addedInput schema / properties / to / format
      Added value: +"date"
    • addedInput schema / properties / to / pattern
      Added value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    • removedInput schema / required
      Removed value: -[
      -  "from",
      -  "to"
      -]
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already cover read-only and non-destructive behavior. The description adds meaningful behavioral context: return shape ({ column } or { column, contains } plus metrics), a 'do not invent columns' constraint, clarification that an omitted filter is unfiltered and not AWS-only, and support for == null on unlabelled dimension values. This is substantial beyond the structured fields.

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 description is long but dense and front-loaded with the core purpose and usage trigger. It earns most of its length with concrete examples and downstream routing, but some compare/filterCel guidance is duplicated from the schema descriptions and could be tightened.

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

Completeness5/5

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

For a tool with six parameters, one nested object, and no output schema, the description is remarkably complete: it covers parameter selection, return shape, filter semantics, examples, and how the result feeds into find_cost_change_factors. An agent has enough context to call it correctly without further inference.

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

Parameters5/5

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

Schema coverage is high at 83%, but the description still adds value beyond it: it explains when to pass compare, what {} auto-derives, why to prefer datePreset over from/to, and what filterCel null/unfiltered means. The examples further clarify realistic parameter combinations, especially the CEL syntax for service filtering.

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

Purpose5/5

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

The description states a specific verb and resource: 'Suggest the best dimensions to group costs by.' It distinguishes itself from siblings by explicitly tying its output to query and find_cost_change_factors, and by framing the tool as the one to call when the user asks 'what should I look at?'.

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

Usage Guidelines5/5

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

The description gives explicit trigger conditions: 'Call this when the user asks "what should I look at?" or when you need columns for query or find_cost_change_factors.' It also provides conditional guidance for compare, datePreset vs from/to, and downstream use, so an agent knows exactly when and how to invoke it.

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