Skip to main content
Glama

Evaluate CAD Script

evaluate_script
Read-only

Use this when you need to run a script and check it compiles. Run a kernelCAD .kcad.ts script and report pass/fail + feature count + diagnostics. When the scene is assembly-built (assembly().part(...) → .model()/.solvedModel()), also returns a parts summary { count, names }. Pass either { file: "" } or { code: "" }. Set { dryRun: true } for fast validation while iterating: transpile + capture + capture-light checks WITHOUT OCCT lowering, DFM gates, or meshing — milliseconds instead of seconds (100x+ on boolean/fillet-heavy scripts). A dry run catches script throws, capture-time API misuse, and assembly validity-gate failures, but NOT lowering failures or dfmSpec diagnostics; it leaves the active session untouched, so finish with a full (non-dry) evaluate_script before using session-dependent tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoInline kernelCAD script source.
fileNoPath to a .kcad.ts script file.
dryRunNoFast validation only: skip OCCT lowering, DFM gates, and meshing. Does not set or clear the active session.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the script compiled and lowered cleanly.
partsNoAssembly parts summary { count, names } when the scene is assembly-built.
dryRunNoTrue when the result came from a fast dry run.
diagnosticsYes
featureCountYesNumber of features captured by the script.

TDQS

A3.7/5.0
Behavior1/5

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

Description indicates full run modifies the active session ('finish with a full evaluate_script before using session-dependent tools'), but annotations declare readOnlyHint=true, implying no side effects. This is a contradiction, so score 1 per instructions.

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?

Well-structured: purpose first, then outputs, then parameter usage, then dryRun details. Slightly verbose but front-loaded with essential information. Every sentence adds value.

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?

Covers purpose, inputs, outputs, and special behavior (dryRun). Output schema exists, so return values need not be described. Despite the annotation contradiction, the description itself is complete for agent usage.

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%, baseline 3. Description adds value by explaining the mutual exclusivity of 'file' and 'code', and the purpose of 'dryRun' beyond the schema description. It clarifies usage context for each parameter.

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 starts with 'run a script and check it compiles' and details specific outcomes: pass/fail, feature count, diagnostics, and optional parts summary. This clearly distinguishes it from sibling tools like verify or why_did_this_fail.

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?

States when to use: 'Use this when you need to run a script and check it compiles.' Also explains dryRun for fast validation and when to use full run ('finish with a full evaluate_script before using session-dependent tools'). Does not explicitly mention alternatives, but context is clear.

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.