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. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "limit": 50,
      +    "out_fields": "*",
      +    "url": "https://services.arcgisonline.com/arcgis/rest/services/BramptonGIS/FeatureServer/0",
      +    "where": "1=1"
      +  },
      +  {
      +    "limit": 100,
      +    "out_fields": "PARCEL_ID,ADDRESS,ZONING",
      +    "url": "https://services.arcgisonline.com/arcgis/rest/services/BramptonGIS/FeatureServer/2",
      +    "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?

With strong annotations (readOnlyHint, openWorldHint, idempotentHint, destructiveHint=false), the description adds meaningful behavioral context beyond annotations. It discloses the return type: 'Returns attribute rows (and geometry)', and clarifies the query syntax. It also goes beyond schema by providing an example usage pattern for sampling, which is valuable for an agent to understand expected behavior.

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 long, front-loaded with the primary action, and each sentence provides distinct useful information: the core query operation, the parameter categories, and a sampling tip. There is no redundancy or filler; it is appropriately sized and well-structured.

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 has no output schema, the description sufficiently covers return values ('attribute rows and geometry'). It enumerates all parameters, references the source of the url (search_datasets), and provides a usage example. The description is complete for an agent to understand the tool's purpose, inputs, and outputs without missing critical context.

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?

While the schema covers 100% of parameters, the description adds semantic meaning by highlighting the SQL-like nature of 'where' and the comma-separated format of 'out_fields'. It also suggests a specific combination ('where=1=1' and 'out_fields=*') to sample data, providing practical guidance that the schema alone does not convey. This exceeds the baseline for fully documented parameters.

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 resource 'layer' are specific, and the mention of SQL-like parameters and return of attribute rows distinctively identifies this as a data retrieval tool. It also distinguishes itself from siblings like layer_info (metadata) by focusing on querying features and returning geometry.

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 clear usage context by specifying the url comes from search_datasets, and gives a practical sampling tip: 'Use where="1=1" + out_fields="*" to sample.' This implies when to use the tool (after finding a dataset) and how to use it effectively. However, it does not explicitly mention alternatives or when not to use it, leaving some room for ambiguity with sibling tools.

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.