Skip to main content
Glama
DownAtTheBottomOfTheMoleHole

Infracost MCP Server

infracost_breakdown

Estimate cloud costs from Infrastructure as Code files such as Terraform. Get a per-resource cost breakdown to plan and optimize spending.

Instructions

Generate cost breakdown for Infrastructure as Code (Terraform, CloudFormation, etc.). Shows cost estimates for cloud resources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to the Terraform/IaC directory or plan JSON file.
apiKeyNoInfracost API key (can also use INFRACOST_API_KEY env var).
fieldsNoFields to include in output (all, price, monthlyQuantity, unit, hourlyCost, monthlyCost).
formatNoOutput format: table, json, html, diff, github-comment, gitlab-comment, azure-repos-comment, slack-message, etc.table
showSkusNoShow SKU details in the output.
compareToNoPath to baseline Infracost JSON for comparison.
extraArgsNoAdditional CLI arguments.
usageFileNoPath to Infracost usage file for resource usage estimates.
configFileNoPath to Infracost config file.
syncUsageFileNoSync usage file with missing resources.
timeoutSecondsNoCommand timeout in seconds.
workingDirectoryNoDirectory where the command is executed. Defaults to current directory.
terraformPlanFlagsNoFlags to pass to 'terraform plan'.
terraformWorkspaceNoTerraform workspace to use.
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only gives a high-level purpose ('Generate cost breakdown... Shows cost estimates') and omits important details such as API key requirements, execution of terraform plan, output formats, or potential side effects. This is a significant gap for a tool with no annotation support.

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 two concise sentences that are front-loaded with the core purpose. Every word adds value without redundancy or filler.

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

Completeness2/5

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

Given the tool's complexity (14 parameters, no output schema, no annotations), the description is too thin. It does not explain return value structure, setup prerequisites, or typical usage patterns. A more complete description should clarify what the output looks like and any execution context.

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?

The input schema provides descriptions for all 14 parameters (100% coverage), so the description adds little beyond that. It mentions 'Terraform, CloudFormation, etc.' which gives context for the path parameter, but this is already implied by the schema. Baseline 3 is appropriate.

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 clearly states the tool's function: generating cost breakdowns for Infrastructure as Code. It uses a specific verb ('Generate') and resource ('cost breakdown'), distinguishing it from sibling tools like diff, upload, and output.

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?

The description implies the tool is for producing cost estimates from IaC, but it does not explicitly state when to use it versus alternatives like infracost_diff or infracost_output. There is no mention of exclusions or comparison with sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DownAtTheBottomOfTheMoleHole/infracost-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server