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": "PARCEL_ID,ADDRESS,ZONING",
      +    "url": "https://services.arcgisonline.com/arcgis/rest/services/example/FeatureServer/1",
      +    "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 declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is established. The description adds behavioral detail beyond annotations: it states the return type ('attribute rows (and geometry)') and describes the query parameters (SQL-like where, out_fields, order_by, limit, offset). This adds meaningful context without contradiction.

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 short sentences, with the core purpose front-loaded. Each sentence contributes: first defines what the tool does, second lists the key parameters, third provides a usage hint. No filler or redundant words.

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 covers the tool's purpose, all six parameters (url, where, out_fields, order_by, limit, offset), the return type, and even a sampling strategy. Since there is no output schema, it doesn't need to detail return structure further. It omits edge cases like error behavior or pagination limits, but for a query tool with this complexity, the description is sufficiently complete.

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 baseline is 3. The description adds semantic value by explaining that the query is SQL-like, by demonstrating the sample pattern (where="1=1" + out_fields="*"), and by tying the url parameter to the output of search_datasets. This goes beyond replicating schema descriptions.

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 states a specific verb ('Query') and a clear resource ('an ArcGIS Feature Service / Map Service layer by its url'), distinguishing it from siblings like search_datasets (which finds datasets) and layer_info (which describes a layer). It further clarifies the tool's scope by listing the SQL-like parameters and specifying that it returns attribute rows and 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 explicitly ties the URL to search_datasets ('by its url (from search_datasets)'), indicating the preferred upstream workflow. It also provides a practical sampling tip ('Use where="1=1" + out_fields="*" to sample'). While it doesn't name alternative tools to avoid, the context makes the intended use clear.

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.