Skip to main content
Glama

set_fan

Destructive

Controls 3D printer fan speed by percentage for part cooling, auxiliary airflow, or chamber exhaust on supported Bambu Lab, OctoPrint, Moonraker, and Elegoo printers.

Instructions

Set the speed of a printer fan.

``percent`` has no default on purpose.  A call meant to turn the fan
OFF can reach Kiln with no ``percent`` at all (a host may drop the
caller's argument name before the request arrives); a default of 100
would run the fan flat out and confirm it.  A setpoint the caller did
not send is refused, never guessed.

Supported on Bambu Lab, OctoPrint, Moonraker/Klipper printers, and
Elegoo's Centauri Carbon (FDM). Prusa Link has no raw G-code endpoint, so
fan control isn't available there (a known limitation of Prusa Link
itself). An Elegoo machine with no part-cooling fan is refused.

Args:
    node: Which fan to set. ``"part"`` (part-cooling / model fan, the
        one that cools each layer) works on every supported printer.
        ``"aux"`` (auxiliary / big fan) and ``"chamber"`` (chamber /
        exhaust fan) are Bambu-only — generic Marlin/Klipper firmware has
        no standard auxiliary or chamber fan Kiln can address without
        knowing that machine's own G-code macros. Defaults to ``"part"``.
    percent: Fan speed 0-100. ``0`` turns the fan off, ``100`` is full
        speed. Required.

Use this to add cooling for bridges and overhangs (part fan), or — on
Bambu — pull heat with the auxiliary fan or run the chamber/exhaust fan
for materials like ABS/ASA. The Bambu chamber fan only exists on
enclosed models — X1 Carbon, X1E, P1S, P2S, H2S — not on open-frame
models (A1, A1 Mini, A2L, P1P), where a chamber command is a no-op. The
printer's own thermal management may override a manual fan speed during
a print.

Branch on ``outcome`` — one field, three values, the same shape
``start_print`` uses for ``print_start``:

- ``"confirmed"``: the printer, in a report AFTER the command, shows the
  effect. For a Bambu, that fan's reported level matches.
- ``"accepted"``: the command was sent and not refused, and the printer
  has not shown the effect yet. Normal on a quiet printer. Read
  ``printer_status()`` before building on it.
- ``"failed"``: the printer's interface refused the command.

``accepted`` (the boolean) keeps its old meaning: sent, not refused. It
is never proof the printer acted. ``success`` is ``False`` only for
``"failed"``.

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": {
      "percent": "<percent>"
    },
    "name": "set_fan"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeNoWhich fan to set. ``"part"`` (part-cooling / model fan, the one that cools each layer) works on every supported printer. ``"aux"`` (auxiliary / big fan) and ``"chamber"`` (chamber / exhaust fan) are Bambu-only — generic Marlin/Klipper firmware has no standard auxiliary or chamber fan Kiln can address without knowing that machine's own G-code macros. Defaults to ``"part"``. Default: "part".
percentYesFan speed 0-100. ``0`` turns the fan off, ``100`` is full speed. Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.1
    • changedInput schema / properties / node / description
      Previous value: -"Default: \"part\"."New value: +"Which fan to set. ``\"part\"`` (part-cooling / model fan, the one that cools each layer) works on every supported printer. ``\"aux\"`` (auxiliary / big fan) and ``\"chamber\"`` (chamber / exhaust fan) are Bambu-only — generic Marlin/Klipper firmware has no standard auxiliary or chamber fan Kiln can address without knowing that machine's own G-code macros. Defaults to ``\"part\"``. Default: \"part\"."
    • addedInput schema / properties / percent / description
      Added value: +"Fan speed 0-100. ``0`` turns the fan off, ``100`` is full speed. Required."
  2. Changed4 schema fields changedv1.5.0
    • removedInput schema / properties / node / default
      Removed value: -"part"
    • addedInput schema / properties / node / description
      Added value: +"Default: \"part\"."
    • removedInput schema / properties / percent / default
      Removed value: -100
    • addedInput schema / required
      Added value: +[
      +  "percent"
      +]
  3. Addedv1.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true; the description goes well beyond them by explaining that a missing percent is refused rather than defaulted (guarding against a host dropping the argument and running the fan flat out), that the printer's own thermal management may override the setpoint, and what confirmed/accepted/failed each mean. The one gap is that the destructiveHint is never explicitly reconciled — it never says what makes a fan call 'destructive' in this tool's model.

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?

Reasonably front-loaded: purpose, then the no-default rationale, then the support matrix, then use cases, then outcome semantics. It loses a point because the Args section re-states the schema descriptions almost word for word, which is redundancy rather than new information.

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 correctly spends space on the returned outcome/accepted/success fields, which is exactly what an agent needs. It also covers the firmware support matrix and the open-frame no-op caveat. Not mentioned, though relevant given the destructive annotation: whether this can be called mid-print safely or requires a printer lock.

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% and the Args block largely reproduces the node and percent schema descriptions verbatim. The added value is the rationale for percent having no default — the argument-dropping hazard — which no structured field conveys, plus which node values are actually addressable per firmware family.

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 line states a specific verb and resource ('Set the speed of a printer fan'), and the node semantics make clear this is cooling-fan control, not print speed. What's missing is explicit differentiation from near-name siblings like set_speed_percent or set_printer_light; an agent has to infer that from the physical description of a part-cooling fan.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives positive use cases (bridges and overhangs for the part fan; aux/chamber for ABS/ASA), and explicit exclusions: Prusa Link has no raw G-code endpoint, Elegoo machines without a part-cooling fan are refused, and chamber commands are no-ops on open-frame Bambu models. An agent can decide when to call and when not to without opening the schema.

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