Skip to main content
Glama

Get the user’s selection

get_selection
Read-onlyIdempotent

Returns what the person you act for has selected in their open editor tabs for this diagram: selection (node / edge ids), items (the first 20 selected records: kind, the node type or the edge ends, and the label) and tabs (each tab's selection and visible viewport). Empty when the diagram is not open.

Input Schema

NameRequiredDescriptionDefault
diagramIdYesDiagram id (from list_diagrams or create_diagram).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish that this is a safe, read-only, idempotent operation. The description adds valuable behavior beyond them: it explains the return shape, states that only the first 20 selected records are included, and notes the result is empty when the diagram is not open.

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?

The description is front-loaded with the core return value and then compactly enumerates the three result components. Despite being a single dense sentence, every clause adds useful information and there is 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?

With no output schema, the description does most of the work by naming the returned fields and the 20-record cap. It is nearly complete for a simple one-parameter read tool, though exact ID formats and tab viewport structure remain unspecified.

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?

The single diagramId parameter has 100% schema description coverage, including its source from list_diagrams or create_diagram. The description does not add parameter-level meaning beyond the schema, so the baseline of 3 is appropriate.

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?

The description names a specific verb and resource: it returns what the acting user has selected in open editor tabs for a diagram. It clearly distinguishes selection data from the full diagram by mentioning selection, items, and tabs, though it does not explicitly contrast itself with siblings like get_canvas.

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?

Usage is implied by the purpose: call it to inspect the user's current selection. The empty-when-not-open condition gives useful context, but there is no explicit when-to-use guidance or comparison to alternatives such as get_canvas.

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.