Skip to main content
Glama

Pick Point by Ray

ray_pick
Read-onlyIdempotent

Use this when you need the faces a ray hits in a local Studio model, nearest first, with points, distances, and normals. Inputs are model units (mm); direction is normalized. Requires the local Studio URL and session token for the same script, reads the current model generation, and returns a set_selection argument object with every hit. feature_id must identify a displayed terminal shape; intermediates have no current viewer shapeIndex. Intersections use the viewer per-face tessellation, so curved-surface points and normals are mesh approximations.

Input Schema

NameRequiredDescriptionDefault
codeNoInline kernelCAD script source.
fileNoPath to a .kcad.ts script. Hosted: `code`, `project:<slug>` (head), or a Studio `/p/<slug>?version=N` link (pinned); no local files.
originYesRay origin [x, y, z] in model units.
sessionYesStudio sessionToken for this script, from GET /__kernelcad/session?script=<path>.
directionYesNonzero ray direction [x, y, z]; normalized internally.
feature_idNoDisplayed terminal feature to ray-pick; defaults to the returned feature. Intermediate features are not available as current viewer selections.
studio_urlYesLocal Studio HTTP origin, e.g. http://localhost:5173.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / file / description
      Previous value: -"Path to a .kcad.ts script. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project."New value: +"Path to a .kcad.ts script. Hosted: `code`, `project:<slug>` (head), or a Studio `/p/<slug>?version=N` link (pinned); no local files."
  2. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.