Skip to main content
Glama

validate_gcode_safe

Read-only

Validates G-code against a specific printer's safety limits, such as PTFE temperature caps and speed limits, to catch unsafe commands before printing.

Instructions

Validate G-code with printer-specific safety limits (PTFE temp caps, speed limits).

        Preferred over ``validate_gcode`` when you know the target printer — uses
        that printer's safety profile for accurate limits.  Without a printer_id,
        judges against the floor Kiln holds a printer it cannot identify to.

        Args:
            commands: G-code commands: a newline-separated string, or a
                list of command strings.
            printer_id: Optional printer model ID for profile-aware validation.
        

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": {
      "commands": "<commands>"
    },
    "name": "validate_gcode_safe"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandsYesG-code commands: a newline-separated string, or a list of command strings.
printer_idNoOptional printer model ID for profile-aware validation. Default: "".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.1
    • addedInput schema / properties / commands / description
      Added value: +"G-code commands: a newline-separated string, or a list of command strings."
    • changedInput schema / properties / printer_id / description
      Previous value: -"Default: \"\"."New value: +"Optional printer model ID for profile-aware validation. Default: \"\"."
  2. Changed4 schema fields changedv1.5.0
    • addedInput schema / properties / commands / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / commands / type
      Removed value: -"string"
    • removedInput schema / properties / printer_id / default
      Removed value: -""
    • addedInput schema / properties / printer_id / description
      Added value: +"Default: \"\"."
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety profile is covered; the description adds real value by naming what is checked (PTFE temp caps, speed limits) and how behavior degrades without a printer profile. It stops short of describing the shape of the validation result, which matters somewhat given there is no output schema.

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?

The opening two sentences are front-loaded and waste-free, putting the differentiator before the caveat. The trailing Args block duplicates the schema verbatim at 100% coverage, which is dead weight, though it costs little overall.

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?

For a two-parameter read-only validator, the definition covers purpose, selection criteria, inputs, and fallback behavior adequately. The remaining gap is that no output schema exists and the description never indicates what a validation response contains (pass/fail, violation list), which would help an agent plan follow-up calls.

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?

Schema coverage is 100%, so baseline is 3, but the prose adds semantics the schema lacks: printer_id changes which safety profile is applied, and its absence triggers a conservative floor profile rather than plain failure. The commands parameter description is a verbatim restatement of the schema and adds nothing.

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 and resource ('Validate G-code') plus the distinguishing scope ('printer-specific safety limits (PTFE temp caps, speed limits)'). It explicitly names the sibling validate_gcode and the condition that separates them, so an agent can pick between the two without opening a schema.

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

Usage Guidelines5/5

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

Gives explicit routing guidance: 'Preferred over validate_gcode when you know the target printer', and states the fallback case ('Without a printer_id, judges against the floor Kiln holds a printer it cannot identify to'). Both the when-to-use and the degraded-mode condition are spelled out.

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