Skip to main content
Glama

select_by_location

Select features from one layer based on spatial relationships to another layer, such as intersects or within a distance, to filter data for mapping and analysis.

Instructions

Select features by spatial relationship to another layer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invertNoINVERT to select everything the relationship does not match.NOT_INVERT
methodNoHow to combine with the current selection.NEW_SELECTION
map_nameNoMap to act on; defaults to the active map.
layer_nameYesLayer or table name as shown by get_layers, or a full dataset path.
relationshipNoINTERSECT, WITHIN_A_DISTANCE, CONTAINS, WITHIN, COMPLETELY_WITHIN, HAVE_THEIR_CENTER_IN, CROSSED_BY_THE_OUTLINE_OF, ...INTERSECT
search_distanceNoDistance for WITHIN_A_DISTANCE, e.g. "500 Meters".
select_featuresYesLayer or path whose features define the relationship.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.1

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden, but it says nothing about the non-destructive/reversible nature of selection, how it interacts with the existing selection, or permission requirements. The 'method' and 'invert' parameters hint at mutating selection state, yet the description never confirms the effect.

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?

A single front-loaded sentence with no filler. It is efficient, though arguably too sparse to earn a 5 given the tool's 7-parameter complexity.

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

Completeness2/5

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

For a 7-parameter spatial-selection tool with no annotations, the description omits selection-state behavior, mirroring/alternatives, and required preconditions. The presence of an output schema relieves it of return-value duty, but the behavioral gaps remain substantial.

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 description coverage is 100%, so the schema already explains relationship, invert, method, search_distance, and map_name. The description adds no syntax or semantic detail beyond listing that a spatial relationship is involved, so the baseline 3 applies.

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?

States a specific verb ('Select') and resource ('features') with the defining mechanism ('by spatial relationship to another layer'). However, it does nothing to distinguish itself from the sibling select_features, which an agent could easily confuse with this spatial-selection variant.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of when this is preferable to select_features or set_selection, and no prerequisites (e.g., both layers must exist in the map). The agent must infer the routing decision entirely.

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

Deploy Server

Other Tools