Skip to main content
Glama

features_get_selected

Retrieve currently selected features from a vector layer. Returns up to 20 features with total selection count; optionally includes bounding boxes.

Instructions

Fetch the currently selected features on a vector layer.

Capped at 20 features (same limit as get_layer_sample) even if more are selected - total_selected in the response gives the real count. Geometry is omitted unless include_bbox is set, in which case each feature gets its bounding box only, never full WKT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layer_idYes
include_bboxNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, the description thoroughly discloses key behavioral traits: a 20-feature cap, the `total_selected` field for real count, and geometry omission unless `include_bbox` is set (only bounding box, never full WKT).

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?

Three sentences: the first states purpose, the next two add essential constraints and behavior. No redundant or extraneous information; maximally efficient.

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?

Given the presence of an output schema (handling return values), the description covers the cap, real count, and geometry behavior. However, it omits error cases (e.g., no vector layer, no selection). Still, it provides sufficient context for typical use.

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 input schema has 0% description coverage, so the description fully compensates for `include_bbox` by explaining its effect on geometry. `layer_id` is not elaborated beyond the schema, but its purpose is obvious. Overall, significant added value 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?

The description starts with a clear verb 'Fetch' and specific resource 'selected features on a vector layer,' immediately distinguishing it from sibling tools like features_get (fetches all features) and features_select_by_expression (selects features).

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?

The description implies usage for retrieving selected features but does not explicitly state when to use this tool vs alternatives like features_get or features_count, nor when not to use it. No exclusions or alternative references are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/piatkowski/qgis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server