Skip to main content
Glama

Estimate infrastructure cost

estimate_cost
Read-onlyIdempotent

Calculate monthly AWS costs per resource from Terraform, CloudFormation, or Pulumi inputs, with FinOps savings tips and a Cost Score. Run after editing IaC to review cost impact before applying.

Instructions

Monthly AWS cost of an infrastructure-as-code input, per resource, with FinOps savings recommendations and a Cost Score. Use it after writing or editing Terraform/CloudFormation/Pulumi. A .tf directory runs a read-only terraform plan. Report the returned total and its notes as-is.

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": {
      "path": "<path>"
    },
    "name": "estimate_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesInfrastructure to analyze: a Terraform or Terragrunt directory, a .tfstate, a CloudFormation template, a Pulumi stack export, or a CloudCostTree YAML/JSON file. Relative to the directory the assistant started the server in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description discloses that a .tf directory runs a read-only `terraform plan` and that results include per-resource costs, savings recommendations, a Cost Score, and notes. It does not cover prerequisites such as Terraform installation, AWS credentials, or error behavior, but it adds meaningful behavioral context.

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?

The description is front-loaded with the cost estimation outcome, then gives usage timing and special .tf directory behavior. Every sentence contributes useful information without unnecessary repetition.

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 a read-only cost estimation tool with full parameter schema coverage and no output schema, the description adequately explains inputs, execution behavior for .tf directories, return contents, and reporting expectations. Minor gaps around prerequisites and comparison alternatives remain, but the core information is present.

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

Parameters3/5

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

Schema description coverage is 100%, and the single `path` parameter is already fully documented in the schema, including all supported input formats. The description adds little parameter-specific detail beyond reinforcing supported IaC types, so the baseline score of 3 is appropriate.

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 description states a specific outcome: monthly AWS cost for an infrastructure-as-code input, broken down per resource, with FinOps savings recommendations and a Cost Score. It is clear what the tool does, but it does not explicitly distinguish itself from the sibling compare_cost tool.

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?

It gives clear timing guidance: use it after writing or editing Terraform, CloudFormation, or Pulumi infrastructure. It does not name when not to use it or explicitly route comparison tasks to compare_cost, so it lacks full alternative guidance.

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

Deploy Server

Other Tools