Skip to main content
Glama

cost_estimate

Calculate per-unit manufacturing cost from volume, material, process, and quantity, factoring material, machine, setup, and amortized tooling expenses.

Instructions

Per-unit cost rollup (Design for Cost). material_cost = volume·density·price ·(1+scrap) from the Materials DB (process: cnc | fdm | casting | injection). process_cost = amortized setup + per-process machine time; tooling amortized over quantity, so unit_cost falls as quantity rises. The machine-time table is order-of-magnitude (fidelity='correlation', band_pct=100) — trust the ratios between processes/quantities, not the absolute dollars; material_cost alone is exact given its inputs.

material may be any Materials-DB card name (material_list / material_get), or anything at all if you price it yourself: price_usd_kg and density_kg_m3 override the DB lookup and are flagged in breakdown.price_basis / density_basis as 'explicit' instead of 'material'. A generic word like 'aluminum' is a CATEGORY, not a card — it carries a density but no price, so it needs price_usd_kg or a real card name (AL6061-T6, …); the error says which.

Two optional inputs sharpen it. tolerance_class ('IT7', '9', …) scales the TABLE machine time by the tolerance-cost curve (see tolerance_cost_check): holding tighter than the process's natural capability roughly doubles cost every 1.5 IT grades. machine_time_hr REPLACES the table with a time a real model computed (cnc_time_estimate) and drops band_pct from 100 to that model's band (50 by default, or machine_time_band_pct); the tolerance factor is then not applied again, because cnc_time_estimate already applied the same curve. Both default to None, reproducing the pre-existing behaviour exactly.

Returns {material_cost, process_cost, tooling_amortized, unit_cost, mass_kg, fidelity, band_pct, breakdown:{…, density_kg_m3, price_usd_kg, density_basis, price_basis, machine_time_hr, machine_time_basis, base_machine_time_hr, tolerance_class, tolerance_factor, tolerance_applied, tolerance_basis}}. Errors on a material with no usable density/price and no override, an unknown process/tolerance class, or a non-positive volume/quantity/machine time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
processNocnc
materialYes
quantityNo
setup_minNo
volume_mm3Yes
tooling_usdNo
price_usd_kgNo
density_kg_m3No
scrap_fractionNo
machine_time_hrNo
tolerance_classNo
machine_rate_usd_hrNo
machine_time_band_pctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does: it discloses the fidelity caveat ('order-of-magnitude', fidelity='correlation', band_pct=100), which outputs are exact vs approximate, that unit_cost falls with quantity, that the tolerance factor is not double-applied when machine_time_hr is given, and enumerates the exact error conditions. This is unusually rich behavioral disclosure.

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

Conciseness3/5

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

Dense multi-paragraph prose packed with useful facts, but it is long and hard to scan; the fidelity caveat and formula context are not front-loaded ahead of the return-shape enumeration. Every sentence roughly earns its place, yet the density hurts quick selection.

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 13-parameter, annotation-free, output-schema-free tool, the description spells out inputs, override behavior, approximate vs exact outputs, the full return structure and the error cases. Nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

With 0% schema description coverage across 13 params, the description compensates well: the cost formulas map volume, density, price, scrap and setup/machine time to their roles, the process enum is enumerated (cnc | fdm | casting | injection), and material/override/tolerance/machine_time params get detailed semantics. Gaps remain for machine_rate_usd_hr, tooling_usd and quantity, which are only implied.

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?

States a specific verb and resource ('Per-unit cost rollup'), names the decomposition (material_cost, process_cost, tooling_amortized, unit_cost) and the Design-for-Cost framing. An agent can distinguish this cost model from cnc_time_estimate, tolerance_cost_check and mass_properties without opening any schema.

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?

Gives clear conditions for the optional inputs: use price_usd_kg/density_kg_m3 to override the DB, tolerance_class to sharpen via the tolerance-cost curve, machine_time_hr to replace the table with cnc_time_estimate output. It points at sibling tools (material_list, material_get, cnc_time_estimate, tolerance_cost_check) but never states explicit exclusions such as 'do not use this for X'.

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