Skip to main content
Glama

upload_file

Upload a local G-code file to your 3D printer via supported protocols, automatically selecting the correct method for Bambu, OctoPrint, Moonraker, or serial connections.

Instructions

Upload a local G-code file to the printer.

Handles FTPS (Bambu), REST multipart upload (OctoPrint/Moonraker), and
serial file transfer automatically.

Args:
    file_path: Absolute path to the print file on the local filesystem.
        The file must exist and be readable.  Accepted extensions follow
        the TARGET PRINTER, not one fixed list — ``printer_status()``
        reports them per machine, and a Bambu declares ``.3mf`` FIRST
        because that is the only thing it will start a print from.
        Bare ``.gcode`` / ``.gco`` / ``.g`` is right for OctoPrint,
        Moonraker, PrusaLink and Duet; on a Bambu it has no start block
        and is refused by the homing gate below.

        When ``slice_model`` produced the file, upload the path it names
        in ``recommended_upload_path`` and do not choose between its
        outputs by hand — it already knows the printer.  (This docstring
        used to say the extension had to be ``.gcode``, ``.gco`` or
        ``.g``, which is narrower than this function's own behaviour and
        sent at least one caller to the one file its printer could not
        print.)
    printer_name: Which printer to upload to.  Omit to upload to the
        default printer, which is what this did before it could be
        aimed.  The G-code dialect scan and the bed-fit gate follow the
        named machine too, so the bytes are checked against the bed
        they are actually going to.

After a successful upload the file will appear in ``printer_files()`` and
can be started with ``start_print()``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
printer_nameNo
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

The description states the outcome: 'After a successful upload the file will appear in printer_files() and can be started with start_print().' It does not mention potential side effects like overwriting existing files, but the expected behavior is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is excessively verbose and highly repetitive. The same sentences about extensions and recommended paths are repeated multiple times with slight rewording, making it unnecessarily long for a simple upload operation.

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?

The description covers all necessary context: protocol handling, file validity, extension rules, printer selection, and post-upload effects. It lacks explicit failure handling details, but overall it is complete for the tool's scope.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters are well described: file_path requires existence and readability, with extensions depending on printer; printer_name allows omission for default. This adds substantial value beyond the bare schema.

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?

The first sentence clearly states 'Upload a local G-code file to the printer.', which is a direct and specific purpose. The description also mentions automatic protocol handling, reinforcing the core function.

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 description provides usage guidance by indicating when to use this tool (e.g., after slicing, using the recommended path) and clarifies that file extensions depend on the target printer. However, it does not explicitly compare with alternative upload tools like upload_file_confirm.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/codeofaxel/kiln'

If you have feedback or need assistance with the MCP directory API, please join our Discord server