Skip to main content
Glama

Filament weight ⇄ length ⇄ cost

calculate_filament_usage
Read-onlyIdempotent

Convert filament grams to metres (and back), compute volume and cost, and estimate how much is left on a spool from its gross weight. Knows densities for PLA, PETG, ABS, ASA, TPU, Nylon, PC, CF blends. Give either grams or meters.

Input Schema

NameRequiredDescriptionDefault
gramsNoFilament weight. Give grams or meters, not both.
metersNoFilament length. Give grams or meters, not both.
materialNopla, petg, abs, asa, tpu, nylon, pc, pla-cf, petg-cf, pa-cf …pla
diameter_mmNoFilament diameter (1.75 or 2.85 are standard).
density_g_cm3NoOverride density if known.
spool_price_usdNo
spool_weight_kgNo
empty_spool_weight_gramsNoWeight of the empty spool (typ. 130–250 g).
spool_gross_weight_gramsNoWeight of spool + remaining filament, to estimate what is left.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • addedInput schema / properties / density_g_cm3 / maximum
      Added value: +3
    • addedInput schema / properties / density_g_cm3 / minimum
      Added value: +0.3
    • addedInput schema / properties / diameter_mm / description
      Added value: +"Filament diameter (1.75 or 2.85 are standard)."
    • addedInput schema / properties / diameter_mm / maximum
      Added value: +3.5
    • addedInput schema / properties / diameter_mm / minimum
      Added value: +1
    • addedInput schema / properties / empty_spool_weight_grams / minimum
      Added value: +0
    • addedInput schema / properties / grams / description
      Added value: +"Filament weight. Give grams or meters, not both."
    • addedInput schema / properties / grams / minimum
      Added value: +0
    • addedInput schema / properties / meters / description
      Added value: +"Filament length. Give grams or meters, not both."
    • addedInput schema / properties / meters / minimum
      Added value: +0
    • addedInput schema / properties / spool_gross_weight_grams / minimum
      Added value: +0
    • addedInput schema / properties / spool_price_usd / minimum
      Added value: +0
    • addedInput schema / properties / spool_weight_kg / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / spool_weight_kg / maximum
      Added value: +50
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is already clear. The description still adds value by naming the built-in material-density table and explaining the spool logic (gross weight minus empty spool). It does not say what purely computational output looks like (e.g., whether cost is returned only when spool_price_usd is supplied), which matters for a tool with no output schema.

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?

Three tight sentences on a single line: capabilities first, then the density table, then the calling constraint. No sentence is filler, and the most important operational rule is placed last for emphasis.

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?

With 9 parameters, several modes and no output schema, the description covers all three modes and the key input rule for each. The only real gap is the return shape for cost and spool-remaining results, which the agent must infer. That is a minor omission rather than a blocking one.

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?

Schema coverage is 78%, so the baseline is 3. The description goes beyond that baseline by naming the built-in density set, which means the agent may omit density_g_cm3, and by repeating the mutually exclusive grams/meters rule. This adds decision-relevant meaning about which parameters are optional in practice.

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 names specific verbs and resources: grams-to-metres conversion, volume and cost computation, and spool-remaining estimation, plus supported materials. It is far more than a restatement of the title. It stops short of 5 because the cost-computation facet overlaps with the sibling calculate_print_cost, and the boundary is never drawn.

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?

The final sentence, "Give either `grams` or `meters`," tells the agent how to call it, which is useful. However, there is no guidance on when to pick this tool over the nearby calculate_print_cost, and there are no stated prerequisites for the spool-estimation mode. Usage is implied by the listed capabilities rather than explicitly routed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources