Skip to main content
Glama
Onshape MCP

Onshape MCP

onshape_eval_featurescript

Read-onlyIdempotent

Evaluates a FeatureScript lambda against a Part Studio and returns the computed result, enabling custom geometry queries and feature logic checks.

Instructions

Evaluate a FeatureScript lambda against a Part Studio and return the result. The script must be a function, e.g. function(context is Context, queries) { return size(evaluateQuery(context, qAllModifiableSolidBodies())); }

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": {
      "did": "<did>",
      "wvm": "<wvm>",
      "wvmid": "<wvmid>",
      "eid": "<eid>",
      "script": "<script>"
    },
    "name": "onshape_eval_featurescript"
  }
}

Input Schema

NameRequiredDescriptionDefault
didYes
eidYes
wvmYes
wvmidYes
scriptYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds the important constraint that the script must be a function of (context, queries) and supplies a working example, but says nothing about execution limits, permissions, or failure behavior of arbitrary user code.

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?

Two sentences, front-loaded with the action, and the inline code example earns its place by showing the exact callable shape. Slightly more could be said without bloat.

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

Completeness2/5

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

An output schema exists so return values needn't be described, but five opaque required identifiers with zero schema documentation is a serious gap for a tool that executes arbitrary code against a Part Studio. The description does not compensate for the missing parameter meaning or the preconditions for evaluation.

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 0% across five required parameters, and the description only indirectly characterizes 'script' through its example signature. The meanings of did, wvm, wvmid, and eid (document/workspace-version-microversion/element identifiers) are left entirely unexplained and must be inferred.

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?

States a specific verb and resource: 'Evaluate a FeatureScript lambda against a Part Studio and return the result.' No sibling does this, so it is distinguishable, but it doesn't articulate the evaluation scope or what 'result' means.

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

Usage Guidelines2/5

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

No when-to-use or when-not-to-use guidance. It doesn't say why an agent would evaluate a lambda rather than call onshape_get_features, onshape_get_bounding_box, or onshape_list_parts, which look like the pre-built alternatives for common queries.

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