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.arcgis.com/sharing/rest/content/items/abc123/FeatureServer/0",
      +    "where": "1=1"
      +  },
      +  {
      +    "limit": 100,
      +    "order_by": "AREA DESC",
      +    "out_fields": "PARCEL_ID,AREA,OWNER",
      +    "url": "https://services.arcgis.com/sharing/rest/content/items/abc123/FeatureServer/1",
      +    "where": "ZONING = 'Residential'"
      +  }
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, providing a safety profile. The description adds value by stating 'Returns attribute rows (and geometry)' and noting the SQL-like nature of the where clause, which informs the agent about potential dialect limitations. This goes beyond what annotations provide, though it does not detail error behavior or pagination edge cases.

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: the first states the core purpose, the second lists key parameters, and the third provides a usage tip. It is front-loaded with the most important information, has zero fluff, and every sentence earns its place.

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 tool's simplicity, the absence of an output schema is compensated by the description's mention of returning attribute rows and geometry. The parameter schema fully documents all inputs with defaults and examples. The description also integrates with the sibling workflow (from search_datasets). No critical information is missing for an agent to invoke this tool correctly.

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 already covers all parameters at 100% coverage, so the baseline is 3. The description adds value by explicitly highlighting recommended parameter combinations (where=1=1 + out_fields=*) and clarifying that out_fields is comma-separated, which reinforces and extends the schema's individual descriptions. This adds a practical usage layer 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 clearly states the tool's function: 'Query an ArcGIS Feature Service / Map Service layer by its url'. The verb 'Query' and the specific resource type distinguish it from sibling tools like layer_info (metadata) and search_within (spatial search). It also mentions returning attribute rows and geometry, further clarifying its purpose.

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 provides context by referencing search_datasets as the source of the URL, implying a workflow. It also gives a specific sampling tip ('Use where="1=1" + out_fields="*" to sample'), which is practical guidance. However, it does not explicitly state when not to use this tool or mention alternatives like layer_info, so it falls slightly short of explicit exclusions.

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.