Skip to main content
Glama

extrude_filament

Manually extrude or retract filament by a set distance in millimeters to load, unload, or purge filament; requires a heated hotend and explicit confirmation.

Instructions

Manually extrude (positive) or retract (negative) filament, in mm. The hotend must already be at or above Klipper's min_extrude_temp (135 °C on the Max4) — heat it with set_temperature first. Capped per call by policy. Requires confirm=true. Blocked during a print.

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": {
      "distance": "<distance>"
    },
    "name": "extrude_filament"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNo
distanceYes
feedrateNo
confirm_tokenNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only say it is a non-idempotent, non-read-only write; the description adds the thermal precondition with a concrete threshold, the policy cap per call, the confirm=true gate, and the during-print block. Those are real operational constraints an agent cannot get from the annotations. Missing only the failure mode when the temp precondition is unmet (error vs. no-op).

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?

Three dense sentences with no filler; the precondition and the confirm gate are front-loaded before the blocking caveat. Every clause carries information, though the em-dash aside about 135 °C could be folded in more cleanly.

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?

An output schema exists, so return values need no explanation, and the description covers the safety-relevant prerequisites for a motion/thermal tool. The gap is the unexplained feedrate and confirm_token parameters, which matter for a tool with a per-call policy cap.

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 0%, so the description carries the full burden. It explains distance (mm, signed) and that confirm=true is required, but says nothing about feedrate (default 300) or confirm_token, leaving two of four parameters unexplained anywhere.

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?

States a specific verb and resource plus the sign convention: positive extrudes, negative retracts, in mm. That is well beyond the bare name. It does not, however, distinguish itself from the sibling load_filament/unload_filament tools, so an agent still has to infer which one to reach for.

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 concrete when-to-use conditions: hotend must be at or above min_extrude_temp (135 °C on the Max4), and names set_temperature as the way to get there first. It also states when the call will fail — during a print. It stops short of explicit routing to load_filament/unload_filament as alternatives.

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