Skip to main content
Glama

upload_gcode

Inspect and upload G-code to a Bambu printer, creating a uniquely named copy to prevent overwriting existing files.

Instructions

Inspect a G-code file and upload a uniquely named copy without overwriting existing printer files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoHostname or IP of the printer (default: value from env)
gcodeNoG-code content to upload, or a readable local .gcode path. Required unless gcode_path is provided. For large files, prefer gcode_path.
filenameYesName for the file on the printer
gcode_pathNoLocal path to a .gcode file to upload. Required unless gcode is provided. This avoids sending large G-code bodies through the MCP request.
bambu_modelNoRequired printer model for inspecting the uploaded G-code, even when not starting it.
bambu_tokenNoAccess token (default: value from env)
bambu_serialNoSerial number (default: value from env)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.1.14
    • removedInput schema / anyOf
      Removed value: -[
      -  {
      -    "required": [
      -      "gcode"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "gcode_path"
      -    ]
      -  }
      -]
    • addedInput schema / properties / bambu_model
      Added value: +{
      +  "description": "Required printer model for inspecting the uploaded G-code, even when not starting it.",
      +  "enum": [
      +    "p1s",
      +    "p1p",
      +    "p2s",
      +    "x1c",
      +    "x1e",
      +    "a1",
      +    "a1mini",
      +    "h2d",
      +    "h2s",
      +    "h2c",
      +    "x2d"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / gcode / description
      Previous value: -"G-code content to upload, or a readable local .gcode path. For large files, prefer gcode_path."New value: +"G-code content to upload, or a readable local .gcode path. Required unless gcode_path is provided. For large files, prefer gcode_path."
    • changedInput schema / properties / gcode_path / description
      Previous value: -"Local path to a .gcode file to upload. This avoids sending large G-code bodies through the MCP request."New value: +"Local path to a .gcode file to upload. Required unless gcode is provided. This avoids sending large G-code bodies through the MCP request."
  2. First observedv1.1.1

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose meaningful traits: an inspection step and non-destructive uniqueness (no overwriting existing printer files). However, it is silent on authentication requirements (the host/token/serial params imply credentialed access), what 'inspect' validates, and error/failure behavior.

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?

A single front-loaded sentence with no wasted words, efficiently conveying the two core actions and the uniqueness guarantee. It is well-sized for the tool's complexity.

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

Completeness3/5

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

For a 7-parameter, no-annotation, no-output-schema tool, the description is thin: it omits credentials expectations, the relationship to the printing workflow, and how the 'inspection' outcome affects the upload. The rich schema compensates for parameter gaps, but the workflow context is incomplete.

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%, so the schema fully documents all seven parameters, including the gcode vs gcode_path tradeoff and the required bambu_model enum. The description adds no parameter-level meaning beyond the baseline, so a 3 is appropriate.

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 description names a specific verb and resource ('Inspect a G-code file and upload a uniquely named copy') and adds scope constraints (unique naming, no overwriting). It is clear what the tool does, but it never differentiates itself from the sibling 'upload_file', leaving the agent to infer the distinction.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over 'upload_file', 'start_print', or the other upload/print siblings, and no stated prerequisites or exclusions. The only usable signal is the implied 'G-code-specific' scope.

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