Skip to main content
Glama

validate_gcode_safe

Read-only

Validate G-code against a specific printer's safety limits for temperature and speed, falling back to conservative defaults when no printer profile is provided.

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,
        falls back to conservative generic defaults.

        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.4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuine behavior beyond that: which limit categories are applied and how behavior degrades to generic defaults without a printer_id. It does not say what the validation returns (pass/fail, violated limits, severity), which is a meaningful gap 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 key differentiator and the sibling routing rule are front-loaded in the first two sentences, which is the right ordering. The trailing 'Args:' block largely duplicates the schema's property descriptions, so it is redundant bulk rather than earning its place.

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 two-parameter read-only validator this covers input semantics well, but with no output schema the description carries the full burden of explaining results and never says what a successful or failed validation looks like. That omission leaves an agent unable to anticipate the response shape.

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 the baseline is 3, but the description adds real semantics the schema lacks: it explains what an absent printer_id actually does (fall back to conservative generic defaults), whereas the schema only shows Default: "". The commands argument description is a verbatim restatement 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 differentiating scope ('printer-specific safety limits'), with concrete examples of what those limits cover (PTFE temp caps, speed limits). It explicitly distinguishes itself from the sibling validate_gcode in the very next sentence.

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 an explicit routing rule: preferred over validate_gcode when the target printer is known. It also states the fallback case — no printer_id means conservative generic defaults — so the agent knows both when to pick this tool and what happens if the optional argument is omitted.

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