Skip to main content
Glama
DownAtTheBottomOfTheMoleHole

Infracost MCP Server

infracost_diff

Compare infrastructure cost changes between current IaC and planned updates. Identify cost impact before merging pull requests.

Instructions

Show cost diff between current IaC and planned changes. Useful for pull request reviews to understand cost impact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to the Terraform/IaC directory or plan JSON file.
apiKeyNoInfracost API key.
formatNoOutput format: table, json, html, diff, github-comment, etc.table
showSkusNoShow SKU details.
compareToNoPath to baseline Infracost JSON for comparison.
extraArgsNoAdditional CLI arguments.
usageFileNoPath to Infracost usage file.
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.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. The word 'Show' implies a read-only operation, but the description does not mention that it may run terraform plan, require an API key, or have network side effects. It adds minimal behavioral context beyond the operation's purpose.

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 sentences long, front-loading the primary function and then adding relevant use-case context. Every sentence contributes meaning with no wasted words.

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 has 13 parameters, no annotations, and no output schema, the description is far too brief. It does not explain how the diff is computed, prerequisites like an API key, relationship to sibling commands, or expected output format, making it inadequate for reliable agent invocation.

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%, with all 13 parameters having descriptions in the input schema, so the baseline is 3. The tool description itself does not add any parameter-specific meaning, but the schema already fulfills this need.

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 with a specific verb 'Show' and resource 'cost diff between current IaC and planned changes'. This distinguishes it from sibling tools like infracost_breakdown, and the mention of pull request reviews adds concrete scope.

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?

The description provides clear context by noting it is 'Useful for pull request reviews to understand cost impact', giving a specific when-to-use scenario. However, it does not mention alternatives or when not to use the tool, so it lacks explicit exclusion guidance.

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