Skip to main content
Glama

Send G-code to Printer

send_to_printer

Use this when you need to upload a .gcode file (e.g. written by export with target: "model", format: "gcode") to a real network printer and, by default, start the print. protocol: 'octoprint' (POST /api/files/local with an X-Api-Key), 'moonraker' (Klipper's POST /server/files/upload), or 'bambu-lan' (Bambu Lab LAN-mode: FTPS implicit-TLS upload on port 990 as user 'bblp' with the printer's LAN access code, then an MQTT print-start command on port 8883 — requires access_code and, unless start_print is false, serial). Pass { dry_run: true } to validate connectivity/authentication only, without uploading or starting a print. Never logs or echoes api_key/access_code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesPrinter hostname or IP.
portNoOverride the protocol default port.
serialNoBambu printer serial number (required to start a print unless start_print is false).
api_keyNoOctoPrint API key (Settings -> API).
dry_runNoValidate connectivity/auth only; never uploads or starts a print.
filenameNoUploaded file name (default: 'kernelcad.gcode').
protocolYes
gcode_pathYesPath to the .gcode file on disk.
access_codeNoBambu LAN-mode access code (printer settings -> LAN Only Mode).
start_printNoStart the print immediately after upload (default: true).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
dry_runNoTrue when only connectivity/auth was validated (no upload, no print start).
diagnosticsNo
uploaded_pathNoPath/name the G-code was stored under on the printer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, openWorldHint=true, and destructiveHint=false; the description carries the behavioral burden and does exceptionally well. It discloses the side effects (upload and print start), the protocol-specific auth and network behavior, the dry_run escape hatch, and the guarantee that credentials are never logged or echoed. No contradiction with annotations.

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?

The description is front-loaded with the primary use case, then packs relevant protocol details, auth requirements, and the dry_run behavior into a dense but efficient paragraph. Every sentence contributes operational information; there is no filler or redundant restating of the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's 10 parameters, three protocols with distinct auth models, and side-effecting behavior, the description covers what an agent needs: when to use it, what each protocol requires, how to avoid side effects, and how to validate connectivity. Since an output schema exists, the return format is not the description's responsibility.

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?

Input schema covers 90% of parameters with good descriptions, so the baseline is 3. The description adds meaningful value by explaining protocol-specific requirements, such as when serial is required for bambu-lan, which parameters matter for each protocol, and what dry_run does. It does not restate what the schema already says.

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/resource: upload a .gcode file to a real network printer and, by default, start the print. It also references the export tool output format, making the purpose concrete and distinct from the CAD/analysis-focused sibling tools.

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?

Explicitly opens with 'Use this when you need to upload a .gcode file...' and explains the dry_run mode for connectivity/auth validation. It names all supported protocols and their prerequisites, giving clear context, though it does not explicitly state when not to use the tool since no close printer sibling exists.

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.