Skip to main content
Glama

Diff CAD Scripts

diff_scripts
Read-only

Use this when you need to see exactly what changed between two script versions. Structured geometric delta between two versions of a kernelCAD script — a baseline ({ baseFile } or { baseCode }) and a revision ({ file } or { code }). Returns agent-readable JSON: per-part added/removed/renamed/changed (volume mm³ + exact bbox deltas, numbers matching inspect({ of: 'part-stats' })), total interference-volume delta with per-pair detail, mate-graph changes (added/removed/changed mates incl. type, connectors, pose, limits), and param changes (value/min/max). Single-shape scripts diff as one "(root)" pseudo-part. Use after editing a script to verify exactly what changed physically before re-rendering. Read-only — never touches the active session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoRevised script — inline source.
fileNoRevised script — path to a .kcad.ts file.
baseCodeNoBaseline script — inline source.
baseFileNoBaseline script — path to a .kcad.ts file.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
baseNoBaseline summary { featureCount, partCount, isAssembly } (success).
sideNoWhich side failed ('base' | 'revised') (failure).
errorNoFailure message (failure).
matesNoMate-graph changes (success).
partsNoPer-part added/removed/renamed/changed/unchanged (success).
paramsNoParam value/min/max changes (success).
revisedNoRevision summary { featureCount, partCount, isAssembly } (success).
errorCodeNo
diagnosticsNo
interferenceNoTotal interference-volume delta + per-pair detail (success).

TDQS

A4.7/5.0
Behavior5/5

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

The description details the output format comprehensively (per-part changes, interference delta, mate-graph changes, param changes) and explicitly confirms it is read-only, aligning with annotations readOnlyHint=true and destructiveHint=false. It also addresses an edge case (single-shape scripts). This adds significant value beyond the annotations.

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?

The description is concise and well-structured. It starts with the usage context, then explains the output in detail, and ends with usage guidance and safety confirmation. Every sentence provides useful information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (multiple output components, 4 parameters), the description covers all essential aspects: usage timing, input pairing, output details, read-only nature, and edge cases. The presence of an output schema reduces the burden, but the description still provides a clear summary.

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?

The input schema has 100% coverage with parameter descriptions. The description adds value by explaining the relationship between parameters: 'a baseline ({ baseFile } or { baseCode }) and a revision ({ file } or { code }).' This clarifies how to pair the parameters, which is not evident from the schema alone.

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?

The description clearly states the tool's purpose: 'see exactly what changed between two script versions.' It uses a specific verb ('diff') and resource ('script versions'), distinguishing it from sibling tools which are for building or querying CAD models, not comparing versions.

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?

The description provides clear usage guidance: 'Use after editing a script to verify exactly what changed physically before re-rendering.' It also states the tool is read-only and never touches the active session. However, it does not explicitly mention when not to use it or suggest alternative tools, but the context is sufficient given the tool's specificity.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Tools are mostly distinct, with clear descriptions for each. However, there is some potential overlap between inspection tools like 'inspect' and 'mesh_summary', and between rendering tools 'render_preview' and 'get_latest_render', which could cause minor confusion.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern, making it predictable for an agent to infer functionality.

Tool Count2/5

44 tools is significantly higher than the typical well-scoped range of 3-15. While the domain is complex, the count feels excessive and could overwhelm an agent.

Completeness4/5

The tool set covers an extensive range of CAD operations including creation, inspection, rendering, export, and verification. Minor gaps exist, such as direct sketch editing tools, but overall it is comprehensive.