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/centennial-parcels/FeatureServer/0",
      +    "where": "1=1"
      +  },
      +  {
      +    "limit": 100,
      +    "order_by": "AREA_SQ_FT DESC",
      +    "out_fields": "PARCEL_ID,ZONING_CLASS,AREA_SQ_FT",
      +    "url": "https://services.arcgis.com/sharing/rest/content/items/centennial-zoning/FeatureServer/0",
      +    "where": "ZONING_CLASS = '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 declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true. The description adds behavioral detail about the return payload (attribute rows and geometry) and the semantics of the where/out_fields clauses. No contradictions. The openWorldHint is complemented by the 'sample' suggestion indicating output can be large.

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 sentences, each dense with information. The first establishes purpose, source tool, key parameters, and return type. The second provides a quick-start tip. No fluff, no redundancy.

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?

With 6 parameters and no output schema, the description covers the essential usage scenarios. It explains all major parameters (where, out_fields, order_by, limit, offset) and provides examples in the schema. It could mention pagination behavior explicitly, but the offset parameter plus the limit description cover that implicitly.

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 description coverage is 100%, so parameters are already well-documented. The description adds value beyond the schema by explaining the SQL-like nature of 'where', the comma-separated 'out_fields', and giving a concrete sampling pattern. It does not repeat field-by-field descriptions but synthesizes them into a usage pattern.

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 action: 'Query an ArcGIS Feature Service / Map Service layer by its url'. It clarifies the resource type (ArcGIS layer) and ties to the sibling search_datasets tool. The phrase 'Returns attribute rows (and geometry)' distinguishes it from layer_info, which likely describes metadata instead of 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: it is intended for querying layers discovered via search_datasets. It also provides an explicit usage tip: 'Use where="1=1" + out_fields="*" to sample.' It does not explicitly mention alternatives or when not to use, but the guidance is practically oriented and sufficient.

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.