Skip to main content
Glama

Get Selection

get_selection
Read-onlyIdempotent

Use this when you need to read the human/agent selection in a local Studio session. Returns one clicked face or edge (or null), with current-generation mesh-local shapeIndex/kind/id and creating featureId. During a rebuild selection is null with “selection pending rebuild” until Studio uniquely verifies the face; ambiguous or deleted faces are cleared. Inspect the current shape before authoring a fillet. Requires a running local Studio opened on the same script; hosted sessions are not supported.

Input Schema

NameRequiredDescriptionDefault
sessionYesStudio sessionToken from GET /__kernelcad/session?script=<path>. Use the same script as the viewer.
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

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context beyond them: what is returned (one face/edge or null), the rebuild-pending null state, that ambiguous/deleted faces are cleared, and that a running local Studio on the same script is required. This is exactly the extra behavioral context the bar asks for.

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?

Front-loaded with the use case, then return semantics, then prerequisites. Every sentence carries information, though the rebuild/pending detail is dense and could be slightly trimmed.

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

Completeness5/5

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

An output schema exists, yet the description still preempts surprises (null during rebuild, cleared ambiguous faces) and states the local-session prerequisite. Nothing an agent needs to call this correctly is missing.

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% and both parameters are documented there, so the baseline is 3. The description reinforces "same script" and local-only constraints but adds no syntax or format detail 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?

States a specific verb (read) and resource (human/agent selection) in a local Studio session, and the contrast with the sibling set_selection is obvious. An agent can distinguish this reader from its writer counterpart immediately.

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?

"Use this when you need to read the human/agent selection" plus "Inspect the current shape before authoring a fillet" gives clear usage context, and the hosted-session exclusion is stated. It stops short of naming set_selection as the explicit alternative for writes, so not a full 5.

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.