Skip to main content
Glama
gpambrozio

onshape-mcp

by gpambrozio

Validate a Part Studio

onshape_validate_part_studio
Read-only

Validate a Part Studio by counting parts and bodies, failing when counts differ from expected values to catch regressions after feature edits.

Instructions

Count parts and bodies, and fail when the counts do not match the expectations you pass. A cheap regression check after a run of feature edits.

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>.
elemYesElement id (tab) — the <elem> segment of the document URL.
expect_partsNoFail unless the Part Studio has exactly this many parts.
expect_bodiesNoFail unless it has exactly this many bodies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already establish readOnlyHint=true, so the safety profile is covered. The description adds useful behavioral context beyond that: it counts parts/bodies and fails on mismatch, and characterizes itself as a 'cheap' operation. It does not detail the exact success/failure return shape, but the core behavioral contract is clear.

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?

Two sentences with no wasted words. The first sentence delivers the core function immediately, and the second adds the valuable regression-check context. It is compact and front-loaded.

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 validation tool with readOnlyHint and fully documented parameters, the description is largely complete. The only mild gap is that without an output schema it does not explicitly spell out what the tool returns on success/failure, but 'fail when counts do not match' conveys the operational intent well enough for an agent to invoke it correctly.

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%, with each parameter already documented (doc/ws/elem identifiers and the expect_parts/expect_bodies meanings). The description only refers to 'expectations you pass' and does not add new constraint information, so the baseline of 3 is appropriate.

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 — 'Count parts and bodies, and fail when the counts do not match the expectations' — tied to a concrete resource, the Part Studio. The phrasing clearly distinguishes it from sibling retrieval tools like onshape_get_parts and onshape_get_body_details by framing it as an assertion/regression check rather than a data fetch.

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 explicitly identifies the use case: 'A cheap regression check after a run of feature edits.' This gives clear context for when to reach for this tool arena. It does not explicitly name alternatives or state when not to use it, but the intended workflow is evident.

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