Skip to main content
Glama

Set Selection

set_selection
Idempotent

Use this when you need to replace the shared local Studio face/edge selection, or clear it with selection:null. The viewer highlights the pick on its next sync (300 ms). Does not edit geometry. Pass model_generation from get_selection; writes from an older generation are rejected. Use only current shape indices. Requires a local Studio session.

Input Schema

NameRequiredDescriptionDefault
sessionYesStudio sessionToken from GET /__kernelcad/session?script=<path>. Use the same script as the viewer.
selectionYes
studio_urlYesLocal Studio HTTP origin, e.g. http://localhost:5173.
model_generationYesmodelGeneration from get_selection; rejects picks from a prior mesh.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Adds substantial behavior beyond annotations: the viewer highlights the pick on its next 300 ms sync, geometry is not edited, stale model generations are rejected, and only current shape indices should be used. This gives the agent operational constraints and side effects that the annotations alone do not convey.

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?

Front-loads the use case and scope, then adds only high-value operational details: sync timing, no geometry edit, generation validation, and local-session requirement. No sentence is redundant.

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?

Complete for this tool: output schema exists, annotations cover safety and idempotency, and the description adds the necessary selection semantics, prerequisites, and stale-generation rejection behavior. An agent has enough information to invoke 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 description coverage is 75%, so most parameters are documented. The description adds important semantics for selection:null clearing and model_generation provenance/rejection, though it does not explain all nested selection fields such as id and featureId.

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 and resource: replacing or clearing the shared local Studio face/edge selection. It clearly distinguishes this write-like selection operation from sibling actions like get_selection, and specifies the face/edge scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use it: to replace the shared selection, or clear it with selection:null. It also names the prerequisite of a local Studio session and directs the agent to get_selection for model_generation, giving clear routing context.

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.