Skip to main content
Glama

estimate_material_cost

Read-only

Estimate filament weight, length, and cost for a 3D print from a mesh file, using material, infill percentage, wall shells, and nozzle size.

Instructions

Estimate material usage and cost for printing a mesh.

        Computes filament weight, length, and cost based on mesh volume,
        infill percentage, wall shell count, and material density.  The
        walls are as wide as the nozzle, and the reply's ``nozzle`` says
        which size was used and where it came from.

        **See also:** ``estimate_print_cost_from_mesh`` for a richer
        estimate that includes support material, adhesion, and electricity.

        Supported materials: pla, petg, abs, tpu, asa, nylon, pc, pla+,
        carbon_fiber_pla.

        :param file_path: Path to mesh file (.stl, .obj, or .glb).
        :param material: Material type (default "pla").
        :param infill_pct: Interior fill percentage 0-100 (default 20).
        :param wall_layers: Number of perimeter shells (default 3).
        :param cost_per_kg: Override material cost in $/kg (0 = use default).
        :param nozzle_mm: Nozzle size in mm.  Left out, Kiln uses the
            nozzle of the only printer it knows of, else its default.
        :returns: Dict with weight, filament length, cost, and ``nozzle``.
        

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": {
      "file_path": "<file_path>"
    },
    "name": "estimate_material_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
materialNoMaterial type (default "pla"). Default: "pla".
file_pathYesPath to mesh file (.stl, .obj, or .glb).
nozzle_mmNoNozzle size in mm. Left out, Kiln uses the nozzle of the only printer it knows of, else its default.
infill_pctNoInterior fill percentage 0-100 (default 20). Default: 20.0.
cost_per_kgNoOverride material cost in $/kg (0 = use default). Default: 0.0.
wall_layersNoNumber of perimeter shells (default 3). Default: 3.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.5.1
    • changedInput schema / properties / cost_per_kg / description
      Previous value: -"Default: 0.0."New value: +"Override material cost in $/kg (0 = use default). Default: 0.0."
    • addedInput schema / properties / file_path / description
      Added value: +"Path to mesh file (.stl, .obj, or .glb)."
    • changedInput schema / properties / infill_pct / description
      Previous value: -"Default: 20.0."New value: +"Interior fill percentage 0-100 (default 20). Default: 20.0."
    • changedInput schema / properties / material / description
      Previous value: -"Default: \"pla\"."New value: +"Material type (default \"pla\"). Default: \"pla\"."
    • addedInput schema / properties / nozzle_mm / description
      Added value: +"Nozzle size in mm.  Left out, Kiln uses the nozzle of the only printer it knows of, else its default."
    • changedInput schema / properties / wall_layers / description
      Previous value: -"Default: 3."New value: +"Number of perimeter shells (default 3). Default: 3."
  2. Changed9 schema fields changedv1.5.0
    • removedInput schema / properties / cost_per_kg / default
      Removed value: -0
    • addedInput schema / properties / cost_per_kg / description
      Added value: +"Default: 0.0."
    • removedInput schema / properties / infill_pct / default
      Removed value: -20
    • addedInput schema / properties / infill_pct / description
      Added value: +"Default: 20.0."
    • removedInput schema / properties / material / default
      Removed value: -"pla"
    • addedInput schema / properties / material / description
      Added value: +"Default: \"pla\"."
    • addedInput schema / properties / nozzle_mm
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Nozzle Mm"
      +}
    • removedInput schema / properties / wall_layers / default
      Removed value: -3
    • addedInput schema / properties / wall_layers / description
      Added value: +"Default: 3."
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds real behavior beyond that: the model assumptions (walls as wide as the nozzle), the nozzle resolution fallback ('only printer it knows of, else its default'), and the shape of the returned dict including the ``nozzle`` provenance field. No cost-accuracy caveats or failure modes are given, keeping it below a 5.

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?

Front-loaded with the purpose, then computation basis, then the alternative, then reference material. The trailing :param/:returns block duplicates the schema verbatim and could be trimmed without loss, but the prose portion is tight and well ordered.

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 no output schema, the description carries the return contract ('weight, filament length, cost, and nozzle') and does so. The main residual gap is that the built-in default densities and default $/kg values are never stated, so an agent cannot predict outputs when cost_per_kg=0 or without a material.

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 100%, so the baseline is 3 and the description is largely restating param docs. It does add meaning the schema lacks: the enumerated list of supported materials (the schema has no enum on ``material``) and the explanation that wall thickness derives from the nozzle size, which ties wall_layers and nozzle_mm together functionally.

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 ('estimate material usage and cost for printing a mesh') and immediately narrows scope by naming the sibling that does something richer. An agent can distinguish it from estimate_print_cost_from_mesh, estimate_cost, and estimate_mesh_weight 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?

The 'See also' line explicitly routes the agent to estimate_print_cost_from_mesh when supports, adhesion, or electricity matter, which is genuine when-to-use guidance. It does not state an explicit exclusion or prerequisite (e.g. mesh must be watertight), so it falls just short of full routing coverage.

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