Skip to main content
Glama
Mastercam MCP Server

Mastercam MCP Server

by FunSize77

read_nc_file

Read-only

Read a posted NC program or text output to verify G-code. Specify an absolute path plus optional start line and line limit to inspect specific portions of .nc, .tap, .cnc, or .eia files.

Instructions

Read (part of) a posted NC program or other text output to verify it.

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": "read_nc_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of a posted NC file (.nc, .tap, .cnc, .eia, .mpf, ...)
max_linesNo
start_lineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false and idempotentHint=false, so the safety profile is covered structurally. The description adds that only a portion is read, which explains the paging behavior, but it says nothing about behavior on a missing/unposted path, encoding, or what the non-idempotent hint implies (file may change between reads). That is a modest addition, not a rich one.

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; the verb and resource come first and the qualifier follows. It is arguably over-terse for the amount of behavior left unexplained, but nothing in it is redundant.

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 simple read tool with annotations covering safety and no output schema to explain, the description gives enough to call it correctly: the file type, that it is a posted/generated artifact, and that reads can be partial. The remaining gaps (window/truncation semantics, missing-file behavior) are minor for this complexity level.

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 33%: only 'path' is described in-schema, while 'max_lines' and 'start_line' carry only titles, defaults and bounds. The description's '(part of)' hints that start_line/max_lines control a window, but it adds no semantics such as whether max_lines truncates silently or how large files should be paged. Baseline 3 for a partially documented schema.

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?

Names a specific verb (Read) and a specific resource (a posted NC program or other text output), and adds the scope qualifier '(part of)' plus the intent 'to verify it'. It is clear and distinct from write-oriented siblings like save_file or export_file, but it never contrasts itself with the closely named check_nc_file, which an agent could easily confuse it with.

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?

The phrase 'to verify it' implies the use case (inspecting generated NC output before running it), which is more than nothing. However there is no explicit when-to-use/when-not guidance and no mention of how this differs from check_nc_file or open_file, so routing must be inferred.

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