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/Norman/FeatureServer/0",
      +    "where": "1=1"
      +  },
      +  {
      +    "limit": 100,
      +    "order_by": "OWNER ASC",
      +    "out_fields": "PARCELID,OWNER,ZONING",
      +    "url": "https://services.arcgisonline.com/arcgis/rest/services/Norman/FeatureServer/1",
      +    "where": "ZONING = 'RES'"
      +  }
      +]
  2. First observed

TDQS

A4.2/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, so the safety profile is covered. The description adds value by disclosing that the tool returns attribute rows and geometry, that the where clause is SQL-like, and that limit/offset support pagination. The sampling tip is also a useful behavioral nuance. No contradictions with annotations.

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 exactly two sentences. The first sentence front-loads the action and parameter list; the second gives a memorable sampling tip. No wasted words, no repetition of schema fields.

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 the tool's moderate complexity (6 params, 1 required, no output schema), the description covers the essential aspects: purpose, parameter behavior, return type, and a usage flow via search_datasets. It omits explicit max limit or error behavior, but those are partly covered by the schema (limit max 2000) and the overall simplicity. The description is sufficient for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all six parameters. The description reiterates the parameter list in a compact form and adds a small usage tip, but it doesn't materially extend the meaning beyond what the schema provides. Baseline 3 is appropriate.

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: 'Query an ArcGIS Feature Service / Map Service layer by its url (from search_datasets).' It lists the key query parameters (where, out_fields, order_by, limit, offset) and states the return type ('Returns attribute rows (and geometry)'). This clearly distinguishes it from siblings like layer_info (metadata) and search_within (spatial search).

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 by mentioning the URL should come from search_datasets, implying a workflow: first find the dataset, then query it. It also provides a practical sampling tip ('Use where="1=1" + out_fields="*" to sample'). However, it does not explicitly state when not to use this tool or name alternatives, so it falls short of a full 5.

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.