Skip to main content
Glama

Subset a layer to a polygon selection

select_within
Read-onlyIdempotent

Create a new layer containing the source layer's features that lie within the supplied polygon. The source layer is untouched. Useful for "show me only the X inside this country/bbox/hand-drawn shape."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
map_idYes
rationaleNoOptional short label (≤300 chars) for the map edit history, e.g. "add wildfire layer". Omit it to send nothing beyond the tool arguments.
selectionYesGeoJSON Polygon or MultiPolygon in [lng,lat] coordinate order.
newLayerIdYesId for the new layer. Must not already be in use in this workspace.
inheritStyleNoDefault true. false emits a new layer with minimal default styling.
sourceLayerIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / rationale / description
      Previous value: -"Short audit-log label (≤300 chars) stating the user-facing goal this call serves, e.g. \"add wildfire layer for the user's California query\". Required on every call. Stored in the operations log so map edits stay traceable — we never see your chat history."New value: +"Optional short label (≤300 chars) for the map edit history, e.g. \"add wildfire layer\". Omit it to send nothing beyond the tool arguments."
    • changedInput schema / required
      Previous value: -[
      -  "map_id",
      -  "sourceLayerId",
      -  "newLayerId",
      -  "selection",
      -  "rationale"
      -]New value: +[
      +  "map_id",
      +  "sourceLayerId",
      +  "newLayerId",
      +  "selection"
      +]
  2. First observed

TDQS

B3.2/5.0
Behavior1/5

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

The description states the tool 'Create[s] a new layer' (a state-mutating operation on the workspace), yet the annotations declare readOnlyHint=true. This is a direct contradiction of the same kind as the create_record calibration case, so the behavioral signal given to the agent is unreliable. The useful extra detail ('source layer is untouched') cannot offset a safety-hint conflict.

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?

Two tight sentences: the first states the operation and the non-destructive guarantee, the second gives a concrete usage idiom. Nothing is padded and the key constraint is front-loaded.

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?

For a 6-parameter, nested-object tool with no output schema, the description adequately conveys the outcome (a new layer, source unchanged). It does not address error surfaces (e.g. duplicate newLayerId, invalid geometry) or what the call returns, but the core call semantics are covered.

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 coverage is 67%: map_id, sourceLayerId and rationale are documented in the schema, and selection/newLayerId/inheritStyle carry inline schema descriptions. The prose adds the spatial semantics ('features that lie within the supplied polygon') but no detail about inheritStyle or the required IDs beyond what the schema already states. Baseline 3 for moderate coverage.

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 output ('Create a new layer containing the source layer's features that lie within the supplied polygon') and clarifies the source layer is untouched. It distinguishes the operation from a plain add_layer by defining the spatial-subset semantics, though it never names the closest sibling (filter_layer) explicitly.

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?

It offers a use-case cue ('show me only the X inside this country/bbox/hand-drawn shape'), which implies when the tool is appropriate. However, there are no explicit when-not conditions or named alternatives such as filter_layer or add_layer, so the agent must infer the boundary.

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.

Resources