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://gis.kinstonplanning.org/arcgis/rest/services/CityData/FeatureServer/0",
      +    "where": "1=1"
      +  },
      +  {
      +    "limit": 100,
      +    "order_by": "PARCEL_ID ASC",
      +    "out_fields": "PARCEL_ID,ADDRESS,OWNER",
      +    "url": "https://gis.kinstonplanning.org/arcgis/rest/services/CityData/FeatureServer/2",
      +    "where": "ZONING = 'RESIDENTIAL'"
      +  }
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, and non-destructive behavior, so the bar for added value is met by the description's disclosure that it 'returns attribute rows (and geometry)' — a behavioral detail not in the annotations. It also implies SQL semantics and pagination via offset/limit, which helps the agent predict the response shape. It doesn't contradict annotations and adds useful context beyond 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?

The entire description is two sentences: the first defines the action and key parameters, the second gives a practical example of how to use it. Every clause earns its place; no filler or redundant restatement. It is tightly structured and front-loaded with the core purpose.

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?

Given there is no output schema, the description compensates by stating the return type ('attribute rows (and geometry)'). It covers the essential workflow (from search_datasets, query with where/out_fields, sample with 1=1) and all parameter semantics are either in the description or schema. Minor gaps like authentication or error handling are not critical for a read-only query tool.

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?

Schema coverage is 100%, so the baseline is 3. The description adds semantic flavor: 'SQL-like', 'comma-separated out_fields', and the sampling idiom. This clarifies the query language and option combination beyond bare schema definitions, justifying a 4.

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 opens with a specific verb-resource pair ('Query an ArcGIS Feature Service / Map Service layer by its url') and clarifies the tool's role within the sibling ecosystem by noting the url comes 'from search_datasets'. It distinguishes from nearby tools like layer_info (metadata) and search_within (spatial search), making its purpose unmistakable.

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 for use: querying a layer found via search_datasets, and includes practical usage tips ('Use where="1=1" + out_fields="*" to sample'). However, it doesn't explicitly state when not to use this tool versus alternatives like search_within or layer_info, so it stops short of full when/when-not guidance.

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.