Skip to main content
Glama

Compare cost of two versions

compare_cost
Read-onlyIdempotent

Compare two infrastructure versions to calculate per-resource monthly cost differences, showing what an edit adds or saves before applying it.

Instructions

Cost difference between two versions of the same infrastructure (e.g. a copy of the original vs. the edited one), per resource. Use it to show what a change adds or saves per month.

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": {
      "baseline_path": "<baseline_path>",
      "current_path": "<current_path>"
    },
    "name": "compare_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
current_pathYesThe changed version.
baseline_pathYesThe original version (same kinds of input as estimate_cost's path).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so safety is covered. The description adds that the result is a per-resource delta expressed per month, which is useful output context, but says nothing about sign conventions (positive vs negative meaning additions vs savings), currency, or handling of resources present in only one version.

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?

Two tight sentences: the first defines what is compared and at what granularity, the second states the use case. Nothing is redundant or buried.

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 two-required-param read-only diff tool with no output schema, the description covers inputs, semantics, and result shape well enough to invoke it correctly. The main residual gap is the sign/currency convention for the returned deltas.

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 coverage is 100%, so baseline_path and current_path are already documented. The description adds one meaningful constraint not in the schema — that both paths must represent the same infrastructure in two versions — but the example given largely restates the schema's 'original' vs 'changed version' wording. Baseline 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?

States a specific operation (cost difference between two versions of the same infrastructure) and output granularity (per resource, per month). It is clearly not estimate_cost, though it never names the sibling explicitly — the schema's reference to estimate_cost's path does the disambiguation.

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?

"Use it to show what a change adds or saves per month" gives a concrete usage context and reinforces that both inputs describe the same infrastructure. It stops short of stating when to prefer estimate_cost or what_if instead, or any prerequisite that the baseline must already exist.

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