Skip to main content
Glama

Query Layer

query_layer
Read-onlyIdempotent

Query an ArcGIS Feature Service / Map Service layer by its url (from search_datasets). SQL-like where, comma-separated out_fields, order_by, limit, offset. Returns attribute rows (and geometry). Use where="1=1" + out_fields="*" to sample.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFeature/Map Service layer url ending in /FeatureServer/<n> or /MapServer/<n>.
limitNoMax features (1-2000, default 50).
whereNoSQL where clause, e.g. "STATE = 'CA' AND YEAR >= 2020". Default "1=1".
offsetNoPagination offset.
order_byNoe.g. "POP DESC".
out_fieldsNoComma-separated field names, or "*" for all (default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "limit": 50,
      +    "out_fields": "*",
      +    "url": "https://services.arcgisonline.com/arcgis/rest/services/example/FeatureServer/0",
      +    "where": "1=1"
      +  },
      +  {
      +    "limit": 100,
      +    "out_fields": "PARCELID,OWNER,ZONING",
      +    "url": "https://services.arcgisonline.com/arcgis/rest/services/example/FeatureServer/0",
      +    "where": "ZONING = 'R1'"
      +  }
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idleHint=true, and destructiveHint=false, establishing this is a safe read operation. The description adds value beyond annotations by stating it 'Returns attribute rows (and geometry)' and demonstrating a sampling pattern. It does not cover error handling or rate limits, but the annotations reduce the burden, and the added detail is useful.

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 three sentences, front-loaded with the purpose, followed by parameter summary, and ends with return type and a usage tip. Every sentence contributes meaning without redundancy, making it concise and well-structured.

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?

The description provides a complete picture for a query tool: it states the input (URL), the parameter types, the return content (rows and geometry), and includes a practical example for sampling. Given the rich schema and annotations, it does not need to explain return values in detail. Minor gaps like error handling and explicit comparison to layer_info are not covered, but overall it is sufficient for correct invocation.

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 100% with each parameter already described. The description briefly mentions 'SQL-like where', 'comma-separated out_fields', 'order_by', 'limit', 'offset', but this largely restates schema information. The sampling tip adds marginal value. Since the schema does the heavy lifting, a baseline score of 3 is appropriate.

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 the tool's function: 'Query an ArcGIS Feature Service / Map Service layer by its url'. This specifies the verb (query), the resource (layer), and the input (url). It also distinguishes itself from sibling tools like search_datasets (which finds datasets) and layer_info (which provides metadata) by focusing on querying a layer's data.

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?

The description gives clear context by indicating the URL comes 'from search_datasets', implying a workflow where search_datasets is used first. It also provides a practical tip for sampling ('Use where="1=1" + out_fields="*" to sample'). However, it does not explicitly name alternatives or state when not to use this tool, such as when layer_info would be more appropriate.

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.