Skip to main content
Glama
gpambrozio

onshape-mcp

by gpambrozio

Evaluate FeatureScript

onshape_eval_featurescript

Run custom FeatureScript functions on an Onshape Part Studio to inspect geometry and return decoded values. Use for general-purpose geometry queries.

Instructions

Run a FeatureScript function against the Part Studio and return its decoded value. The general-purpose way to inspect geometry: 'function(context is Context, queries) { ... }'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wsYesWorkspace id — the <ws> segment of the document URL.
docYesDocument id — the <doc> in cad.onshape.com/documents/<doc>/w/<ws>/e/<elem>.
rawNoReturn Onshape's raw response instead of the decoded value.
elemYesElement id (tab) — the <elem> segment of the document URL.
scriptYesA FeatureScript function expression taking (context, queries).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no behavioral annotations besides a title, the description carries the burden of disclosure. It does clarify that the tool returns a decoded value (or raw response via the 'raw' parameter) and frames the operation as inspection, which suggests it is non-mutating. However, it does not explicitly guarantee no side effects on the document or mention required permissions, which would be valuable for an arbitrary-code evaluation tool.

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?

The description is two efficient sentences with the purpose, the general-use context, and the required script signature all front-loaded. It contains no filler, though it could slightly improve structure by separating the signature example more clearly.

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

Completeness3/5

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

The description covers the basics: what the script should look like, where it runs, and what kind of output to expect. However, with no output schema and no annotations, it leaves gaps around return value types, error behavior, whether evaluation can have side effects, and common usage patterns—significant for an advanced, open-ended evaluation 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 description coverage is 100%, so the schema already documents all five parameters. The description adds the exact function signature 'function(context is Context, queries) { ... }', but this largely restates the script parameter's schema description ('function expression taking (context, queries)'). Thus the description provides no substantial parameter meaning beyond the schema.

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 states a specific action ('Run a FeatureScript function'), identifies the target resource ('against the Part Studio'), and explains the result ('return its decoded value'). It also brands itself as 'the general-purpose way to inspect geometry,' which differentiates it from the many specific feature-creation and inspection siblings.

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 general-purpose way to inspect geometry' implies this is the fallback tool when no dedicated sibling applies, but it never explicitly says when to prefer it or when to avoid it. The usage guidance is implied rather than stated as direct selection criteria or exclusions.

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

Deploy Server

Other Tools