Skip to main content
Glama
Mastercam MCP Server

Mastercam MCP Server

by FunSize77

check_nc_file

Read-only

Review posted NC/G-code before running to flag F0 feeds, spindle-off cutting, H/D mismatches, stock-zone rapids, travel-limit moves, and missing program end; reports tool Z ranges and program extents.

Instructions

Review posted G-code before it runs: F0 feeds, cutting with the spindle off, H/D numbers that do not match the tool, rapids into the stock zone, moves outside the machine travel, missing program end; plus each tool's Z range, feeds and speeds and the program extents. A review aid, not a simulation.

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": {
      "path": "<path>"
    },
    "name": "check_nc_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of a posted NC file
stock_top_zNoTop of the stock: rapids below it are flagged
travel_limitsNoMachine travel in program coordinates, e.g. {"x": [-10, 10], "y": [-8, 8], "z": [-20, 0.5]}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description adds the scope limit 'not a simulation,' which usefully tells the agent this is static analysis, not material-removal verification. It does not say what the output looks like, how violations are reported, or whether the file must be a specific post format.

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?

Front-loaded with the verb and object, then a compact semicolon-delimited list of checks and outputs. Every clause carries information; nothing is redundant padding.

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?

With no output schema, the description does the work of telling the agent what comes back: per-check findings plus each tool's Z range, feeds and speeds, and program extents. The reporting format (structured list vs. text, severity levels) remains unspecified, a minor gap for a read-only analysis tool.

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 coverage is 100%, so the schema already documents path, stock_top_z, and travel_limits with examples. The description's mentions of 'rapids into the stock zone' and 'moves outside the machine travel' correspond to those parameters but add no syntax or format detail beyond what the schema states.

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 ('Review') and resource ('posted G-code') and then enumerates the concrete checks performed: F0 feeds, spindle-off cutting, H/D mismatches, rapids into stock, travel violations, missing program end. This enumeration makes it clearly distinct from a plain reader like read_nc_file without needing to name it.

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

Usage Guidelines4/5

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

'Review posted G-code before it runs' gives clear timing context for when to call it, and 'A review aid, not a simulation' sets a boundary on expectations. It does not name an alternative tool or an explicit when-not-to-use condition, so it stops short of a 5.

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