Skip to main content
Glama

calculate_cogm

Calculates Cost of Goods Manufactured for a recipe using exchange prices, efficiency, and self-consumption to determine per-unit production costs.

Instructions

Calculate Cost of Goods Manufactured for a recipe.

Args:
    recipe: Recipe name (e.g., "1xGRN 1xBEA 1xNUT=>10xRAT")
    exchange: Exchange code for pricing (e.g., "CI1").
              Valid: AI1, CI1, CI2, IC1, NC1, NC2.
    efficiency: Production efficiency multiplier (default: 1.0 = 100%)
    self_consume: If True, use produced output to satisfy workforce needs.

Returns:
    TOON-encoded COGM breakdown including cogm_per_unit, costs, and output.

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": {
      "recipe": "<recipe>",
      "exchange": "<exchange>"
    },
    "name": "calculate_cogm"
  }
}

Input Schema

NameRequiredDescriptionDefault
recipeYes
exchangeYes
efficiencyNo
self_consumeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It usefully states defaults, valid exchange codes, and that the result is a TOON-encoded COGM breakdown, but it does not explicitly state side-effect behavior, error conditions, or performance characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with clear Args and Returns sections and is front-loaded with the tool purpose. The examples and valid-value list are worth including, though the docstring style is slightly verbose.

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

Completeness5/5

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

For a four-parameter calculation tool with an output schema, the description provides enough context to invoke it correctly: purpose, required inputs, exchange valid values, defaults, and the general shape of the return value. It does not need to fully document the output schema.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: it gives a recipe syntax example, lists valid exchange values not present as schema enums, explains the efficiency multiplier default, and describes self_consume behavior.

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 verb and resource: calculate Cost of Goods Manufactured for a recipe. It is clearly a calculation tool, but it does not explicitly distinguish itself from sibling calculators such as calculate_building_cost or calculate_plan_io.

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?

Usage is implied by the required recipe and exchange parameters, and the description explains valid exchange values. However, it gives no explicit when-to-use guidance, when-not-to-use guidance, or comparison to alternative calculation tools.

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