Skip to main content
Glama
DownAtTheBottomOfTheMoleHole

Infracost MCP Server

infracost_comment

Post cloud cost estimates to pull requests on GitHub, GitLab, Azure Repos, or Bitbucket to inform infrastructure spending decisions.

Instructions

Post cost estimate comments to pull requests on GitHub, GitLab, Azure Repos, or Bitbucket.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoCustomize comment tag to support multiple scenarios.
pathNoPath to Infracost JSON file. Optional; auto-detected from common filenames when omitted.
repoNoRepository in format owner/repo.
tokenNoGitHub/GitLab/Azure DevOps/Bitbucket token.
apiKeyNoInfracost API key.
commitNoCommit SHA.
dryRunNoDry run mode - generate comment without posting.
behaviorNoBehavior: update (default), new, or delete-and-new.
platformNoPlatform: github, gitlab, azure-repos, or bitbucket.github
extraArgsNoAdditional CLI arguments.
pullRequestNoPull request number.
timeoutSecondsNoCommand timeout in seconds.
workingDirectoryNoDirectory where the command is executed.
Behavior2/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. It conveys the core side effect ('post'), but omits important context such as the need for authentication tokens, the ability to update/delete comments via the 'behavior' parameter, or that 'dryRun' prevents actual posting. This leaves the agent without critical details about how the tool modifies external resources.

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 a single, compact sentence that immediately states the tool's action, target, and supported platforms. It is front-loaded and contains no redundant or extraneous information.

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?

For a tool with 13 parameters and no output schema, the description is too thin. It does not explain the expected workflow (e.g., whether a prior Infracost breakdown is needed), the behavior of the comment (create/update/delete), or any prerequisites like tokens. The schema documents parameters but not the overall operational 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?

Schema description coverage is 100%, so the baseline is 3. The description adds no additional parameter semantics beyond the schema; it does not reinforce or clarify parameter usage. However, the schema's own descriptions are thorough, so the description doesn't need to compensate.

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 purpose with a specific verb ('Post') and resource ('cost estimate comments to pull requests'), explicitly naming four supported platforms. This distinguishes it from sibling tools like infracost_breakdown or infracost_diff, which serve different functions.

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 implies when to use the tool (when you need to post cost estimates to PRs) and names the supported platforms, providing clear context. However, it does not explicitly mention alternatives or exclusions, such as when to use infracost_diff or infracost_output instead.

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