query_layer

Pack: arcgis-hub · Endpoint: https://gateway.pipeworx.io/arcgis-hub/mcp

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.

Parameters

NameTypeRequiredDescription
urlstringyesFeature/Map Service layer url ending in /FeatureServer/ or /MapServer/.
wherestringnoSQL where clause, e.g. “STATE = ‘CA’ AND YEAR >= 2020”. Default “1=1”.
out_fieldsstringnoComma-separated field names, or ”*” for all (default).
order_bystringnoe.g. “POP DESC”.
limitnumbernoMax features (1-2000, default 50).
offsetnumbernoPagination offset.

Example call

Arguments

{
  "url": "https://services.arcgis.com/sharing/rest/content/items/abc123/data/FeatureServer/0",
  "where": "1=1",
  "out_fields": "*",
  "limit": 50
}

curl

curl -X POST https://gateway.pipeworx.io/arcgis-hub/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_layer","arguments":{"url":"https://services.arcgis.com/sharing/rest/content/items/abc123/data/FeatureServer/0","where":"1=1","out_fields":"*","limit":50}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('query_layer', {
  "url": "https://services.arcgis.com/sharing/rest/content/items/abc123/data/FeatureServer/0",
  "where": "1=1",
  "out_fields": "*",
  "limit": 50
});

More examples

{
  "url": "https://services.arcgis.com/sharing/rest/content/items/def456/data/FeatureServer/1",
  "where": "STATE = 'CA' AND YEAR >= 2020",
  "out_fields": "OBJECTID,NAME,POPULATION",
  "order_by": "POPULATION DESC",
  "limit": 100,
  "offset": 0
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "arcgis-hub": {
      "url": "https://gateway.pipeworx.io/arcgis-hub/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build August 10, 2026