Skip to main content
Glama

upload_gcode

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

Instructions

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

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": {
      "filename": "<filename>"
    },
    "name": "upload_gcode"
  }
}

Input 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. Changed1 schema field changedv1.1.42
    • changedInput schema / properties / bambu_model / enum
      Previous value: -[
      -  "p1s",
      -  "p1p",
      -  "p2s",
      -  "x1c",
      -  "x1e",
      -  "a1",
      -  "a1mini",
      -  "h2d",
      -  "h2s",
      -  "h2c",
      -  "x2d"
      -]New value: +[
      +  "p1s",
      +  "p1p",
      +  "p2s",
      +  "x1c",
      +  "x1e",
      +  "a1",
      +  "a1mini",
      +  "h2d",
      +  "h2dpro",
      +  "h2s",
      +  "h2c",
      +  "x2d"
      +]
  2. 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."
  3. First observedv1.1.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag writes (readOnlyHint=false), non-idempotency, and non-destructiveness, and the description usefully explains why: each call produces a uniquely named copy and existing printer files are never overwritten. It stops short of covering what 'inspect' actually checks, whether inspection failure aborts the upload, or that credentials may come from env.

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?

A single well-formed sentence with the action first and the safety-relevant constraint (no overwrite, unique name) front-loaded. Nothing is redundant.

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 write tool with no output schema, the one-liner leaves real gaps: what the inspection step produces or verifies, how failures surface, and whether inspection is prerequisite to the upload succeeding. The non-overwrite guarantee is the main thing an agent needs, and that is present.

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 all seven parameters, including the gcode vs gcode_path tradeoff and the bambu_model enum requirement, are documented in the schema itself. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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 gives a concrete compound verb (inspect + upload) on a specific resource (a G-code file), plus a distinguishing scope detail: it writes a 'uniquely named copy' and never overwrites. That partially separates it from the generic upload_file sibling, though it never names that sibling or clarifies whether inspection can reject the upload.

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

Usage Guidelines3/5

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

Usage is only implied by the mention of G-code and non-overwriting behavior. With siblings like upload_file, inspect_print_file, and bambu_connect_import_file in the set, an explicit 'use this instead of X when...' would be valuable and is absent.

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