Skip to main content
Glama

3d-cad

gcode_estimate_and_inject

Calculate exact filament length, mass (grams), spool cost, and print time from G-Code, and inject M600/Klipper PAUSE filament swaps at target Z heights.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gcode_estimate_and_inject"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoRaw G-Code content.
costPerKgNo
inputPathNo
diameterMmNo
outputPathNo
densityGcm3No
pauseDialectNomarlin
swapZHeightsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior2/5

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

'Inject' signals a mutation of the G-Code, but with no annotations the description must carry the whole behavioral burden and it doesn't: it never says whether the modified G-Code is returned in-place, written to outputPath, or both, nor what happens when text and inputPath are both supplied or both omitted. Permission needs, idempotency, and error conditions for an unrecognized dialect or invalid Z heights are all undisclosed.

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 filler, and the two capabilities are ordered sensibly with the upstream calculation first. It is dense to the point of cramming two distinct operations into one clause, but nothing is wasted.

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 tool with no annotations, no output schema, 8 parameters and zero required fields, the description covers the headline outcome but not the I/O contract. An agent still has to open the schema to learn how G-Code enters and exits, and there is no statement of what the computation or injection returns.

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

Parameters2/5

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

Schema description coverage is only 13% across 8 parameters, so the description needs to compensate and largely doesn't. It implies the existence of cost, density, diameter and swap-height inputs through the outputs it names, but adds no meaning for costPerKg, densityGcm3, diameterMm units or defaults, the text vs inputPath vs outputPath routing, or what each pauseDialect value produces.

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 specific verbs and resources: computes filament length, mass in grams, spool cost and print time from G-Code, plus injects M600/Klipper PAUSE swaps at target Z heights. That is far more than a restatement of the name. It does not differentiate itself from the nearest sibling, stl_slice_to_gcode, so an agent can't tell from the text alone whether to estimate from existing G-Code or slice an STL first.

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 implied by the description (run it on raw G-Code to price a print, or to place filament swaps at given Z heights), and the pauseDialect enum hints at targeting a specific firmware family. But there is no explicit when-to-use vs. when-not, no guidance on choosing between the text and inputPath inputs, and no mention that nothing is required.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources