Skip to main content
Glama

Get selection

get_selection
Read-only

Retrieve selected diagram cells—IDs, labels, edge endpoints, shape position/size, and page—so you can apply edits to exactly what the user selected.

Instructions

Return the cells the user has selected in the preview: their ids and labels, for edges the source and target ids, for shapes the position and size, and the page they are on. Call this when the user refers to what they selected ("this box", "these arrows", "the selected shapes"), then act on the ids with edit_diagram. Says when nothing is selected. Needs the preview tab to be open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuine behavioral context beyond that: the empty-selection case ("Says when nothing is selected") and the preview-tab prerequisite. It stops short of describing the exact return envelope, but the empty-state and dependency disclosures are substantive.

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 return payload and then the trigger, prerequisite, and follow-up in three tight sentences with no filler. The middle enumeration of edge/shape fields reads as a run-on list, slightly hurting scannability, but every clause carries information.

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?

With no output schema present, the description correctly carries the burden of explaining what comes back, including the empty-selection case, and it flags the preview-tab dependency. Nothing an agent needs in order to call this correctly and interpret the result is missing.

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?

The tool takes zero parameters, so there is nothing to disambiguate and the baseline is 4. The description's payload enumeration is about return values rather than inputs, and no input semantics are needed.

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 (return the cells the user has selected in the preview) and enumerates the payload: ids/labels, edge source and target ids, shape position and size, and page. This distinguishes it clearly from siblings like get_diagram or list_pages, which return whole-document state rather than the current selection.

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?

Gives explicit trigger conditions with example user phrasings ("this box", "these arrows", "the selected shapes") and names the follow-up tool (edit_diagram) for acting on the ids. It also states the prerequisite that the preview tab must be open, so an agent knows when the call will fail.

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