Skip to main content
Glama

Select by Attribute

select_by_attribute
Idempotent

Filter features in a layer using a SQL where-clause to apply attribute conditions. Choose from new, add, remove, or subset selections and returns the count.

Instructions

Select features in a layer using a SQL where-clause (e.g. "population > 100000"). selection_type: NEW_SELECTION (default), ADD_TO_SELECTION, REMOVE_FROM_SELECTION, SUBSET_SELECTION. Returns the selected feature count. Use list_fields and get_unique_values first to build a valid clause.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerYes
where_clauseYes
selection_typeNoNEW_SELECTION

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations only provide idempotentHint. Description adds return value (selected feature count) and explains selection_type behaviors. Does not detail side effects on existing selection, but the options imply them.

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 well-structured sentences that are front-loaded with the key purpose and example. Every sentence adds value without verbosity.

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?

Given the output schema exists (not shown but indicated), the description covers prerequisites, parameter options, and return value. It is thorough for a tool with moderate complexity.

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?

With 0% schema description coverage, the description adds meaning for where_clause (example) and selection_type (enum values). However, it does not clarify the 'layer' parameter format or that it expects a layer name from list_layers.

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 clearly states 'Select features in a layer using a SQL where-clause' with an example, and differentiates from siblings like clear_selection, count_features, and get_layer_features by focusing on selection via SQL.

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

Usage Guidelines4/5

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

Provides explicit guidance to 'use list_fields and get_unique_values first to build a valid clause' and lists the selection_type options. Does not explicitly mention when not to use, but the guidance is sufficient.

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/qiobn/arcpro-mcp'

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