Skip to main content
Glama

set_material

Destructive

Records which filament material is loaded in a printer as a user-reported claim, so agents can track stock and link a spool for usage counting.

Instructions

Record which filament material is loaded in a printer.

This writes down a CLAIM, not a measurement: nothing verifies the spool,
and the record keeps saying the same thing after a filament swap.  Kiln
stamps it ``determined_by: user_reported`` and every reader says so, so
never report the recorded material back as confirmed or sensed.

Args:
    printer_name: Target printer name.
    material: Material type (PLA, PETG, ABS, etc.).
    color: Optional filament color.
    spool_id: Optional ID of a tracked spool (see ``list_spools``).
        Linking one is what lets Kiln count that spool down as this
        printer prints from it.
    tool_index: Extruder index for multi-tool printers (default 0).  On
        a printer with a multi-material unit, the tray's id as
        ``ams_status`` reports it.

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": {
      "printer_name": "<printer_name>",
      "material": "<material>"
    },
    "name": "set_material"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNoOptional filament color.
materialYesMaterial type (PLA, PETG, ABS, etc.).
spool_idNoOptional ID of a tracked spool (see ``list_spools``). Linking one is what lets Kiln count that spool down as this printer prints from it.
tool_indexNoExtruder index for multi-tool printers (default 0). On a printer with a multi-material unit, the tray's id as ``ams_status`` reports it. Default: 0.
printer_nameYesTarget printer name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.5.1
    • addedInput schema / properties / color / description
      Added value: +"Optional filament color."
    • addedInput schema / properties / material / description
      Added value: +"Material type (PLA, PETG, ABS, etc.)."
    • addedInput schema / properties / printer_name / description
      Added value: +"Target printer name."
    • addedInput schema / properties / spool_id / description
      Added value: +"Optional ID of a tracked spool (see ``list_spools``). Linking one is what lets Kiln count that spool down as this printer prints from it."
    • changedInput schema / properties / tool_index / description
      Previous value: -"Default: 0."New value: +"Extruder index for multi-tool printers (default 0).  On a printer with a multi-material unit, the tray's id as ``ams_status`` reports it. Default: 0."
  2. Changed4 schema fields changedv1.5.0
    • removedInput schema / properties / color / default
      Removed value: -null
    • removedInput schema / properties / spool_id / default
      Removed value: -null
    • removedInput schema / properties / tool_index / default
      Removed value: -0
    • addedInput schema / properties / tool_index / description
      Added value: +"Default: 0."
  3. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With annotations present, the description goes well beyond them: it frames the write as an unverified user-reported claim, discloses the provenance stamp (determined_by: user_reported), explains that the record goes stale after a filament swap, and warns readers not to treat it as sensed data. The one gap is that destructiveHint=true is unexplained — it never states that the prior material record is replaced or that the spool counter is affected.

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 critical framing (claim, not measurement) is front-loaded in the first two paragraphs, and sentences are dense with real information. The reStructuredText Args block, however, merely duplicates text already in the input schema and could be dropped without loss.

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 5-parameter mutation with no output schema, the description covers the epistemic status, provenance tagging, spool linkage, and multi-tool indexing, which is substantial. It omits what happens to an existing record on overwrite and whether any confirmation step is expected, which are the remaining behavioral gaps.

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 description coverage is 100% and the docstring parameter text is verbatim identical to the schema descriptions, so the description adds no meaning beyond the structured fields. The one genuinely useful semantic link — that supplying spool_id is what enables spool countdown — is already present in the schema itself, so baseline 3 applies.

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 first sentence gives a specific verb and resource ('Record which filament material is loaded in a printer'), which is clearly distinct from read-side siblings like get_material or get_active_material. It does not explicitly differentiate itself from adjacent writers such as load_filament or record_filament_colour, so it falls short of a 5.

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 context is implied (this is the record-keeping step, and list_spools is named as a prerequisite for obtaining a spool_id). It also gives a downstream usage rule: never report the recorded material back as confirmed or sensed. However, it never says when to prefer this over load_filament or record_filament_colour, nor does it state prerequisites such as whether the printer must be registered or idle.

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