Skip to main content
Glama
dsh18235538266-crypto

onshape-mcp-codex

render_sketch

Render an Onshape sketch to a 2D PNG with geometry and constraint badges for visual verification, complementing structured text output.

Instructions

Render a BTMSketch-151 to a 2D PNG (sketch-local mm, looking down the sketch normal). Onshape's /shadedviews shows solids but not sketch geometry — this plots each line / arc / circle / point directly and overlays constraint badges: FIX = red square, LENGTH / DIAMETER / RADIUS / DISTANCE = green label, HORIZONTAL / VERTICAL = H/V tag.

Complements inspect_sketch (structured text). Same entity ids are labeled on the drawing. Returns an image_id that crop_image can zoom into.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNo
heightNo
elementIdYesPart Studio element ID
documentIdYes
showLabelsNoLabel each entity with its id on the drawing.
sketchNameNoSketch name. Used when sketchFeatureId is not given.
workspaceIdYes
showConstraintsNoOverlay FIX / dimension / H / V badges.
sketchFeatureIdNofeatureId of the target BTMSketch-151 (preferred).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the behavioral burden. It discloses output projection/coordinate space, that it plots sketch geometry rather than solids, exact constraint-badge styling, entity-id labeling, and the image_id return value. It does not discuss side effects or failures, but rendering is naturally non-destructive and the stated behavior is unusually specific.

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 tight paragraphs with the core function first and integration notes second; each clause adds information (projection, badge legend, sibling relation, downstream crop). There is no filler and no mere repetition of schema fields.

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 9-parameter, no-output-schema tool, the description covers image content, coordinate system, label/constraint overlays, and the return contract (image_id). It could be more explicit about when to prefer sketchFeatureId over sketchName and about required IDs, but overall an agent has what it needs to select and call it correctly.

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 covers only 56% of parameters; the description compensates by tying sketchFeatureId to BTMSketch-151, decoding showConstraints badge types (FIX, dimension, H/V), clarifying showLabels entity-id labels, and giving width/height meaning via sketch-local mm. It leaves generic documentId/workspaceId and width/height defaults undocumented, but enough is added beyond 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?

States a precise verb-object pair — render a BTMSketch-151 to 2D PNG — and specifies entity types (line/arc/circle/point), projection (down sketch normal), and units (sketch-local mm). It also names inspect_sketch and crop_image as related tools, so it is not confusable with render_part_studio_views or render_assembly_views.

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?

Provides strong context: contrasts with /shadedviews (solids not sketch geometry), points to inspect_sketch as a structured-text complement, and tells the agent the returned image_id feeds crop_image. It does not spell out an explicit 'use this when… and use that when…' rule, but the decision context is clear.

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