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 server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project.
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. Added

TDQS

A3.9/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses that the tool reads the *current* model generation, requires a matching studio session, only works with displayed terminal shapes, and — critically — that intersections come from per-face tessellation, so curved-surface points and normals are mesh approximations. That is exactly the kind of accuracy caveat an agent would otherwise get wrong.

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?

Five dense sentences, front-loaded with the "Use this when..." trigger, and each sentence carries distinct information (units, auth, generation read, feature constraint, tessellation caveat). Slightly list-like, but no filler.

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?

An output schema exists, so omitting return-shape detail is fine, yet the description still usefully says the result is a set_selection argument object with all hits. Constraints, units, auth, and accuracy limits are all covered; only error/failure behavior (bad session, stale generation) is left unaddressed.

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 coverage is 100%, so the schema already documents every parameter. The description adds only marginal meaning: model units in mm, and the rationale for the feature_id constraint (intermediates have no current viewer shapeIndex). It repeats what the schema already says about direction being normalized internally, so the baseline 3 applies.

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 — ray-picking the faces a ray hits in a local Studio model — plus the ordering (nearest first) and payload (points, distances, normals). An agent knows exactly what the call returns. It does not name a sibling it replaces or differs from (e.g. get_selection, get_model_mesh), so it stops short of full sibling differentiation.

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?

"Use this when you need the faces a ray hits" gives an implied trigger, and it adds prerequisites (local Studio URL, session token for the same script, feature_id must be a displayed terminal shape). But it never states when NOT to use it or which sibling handles the overlapping case, leaving selection partly to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.