query_layer
Pack: arcgis-kamloops · Endpoint: https://gateway.pipeworx.io/arcgis-kamloops/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
| Name | Type | Required | Description |
|---|---|---|---|
url | string | yes | Feature/Map Service layer url ending in /FeatureServer/ |
where | string | no | SQL where clause, e.g. “STATE = ‘CA’ AND YEAR >= 2020”. Default “1=1”. |
out_fields | string | no | Comma-separated field names, or ”*” for all (default). |
order_by | string | no | e.g. “POP DESC”. |
limit | number | no | Max features (1-2000, default 50). |
offset | number | no | Pagination offset. |
Example call
Arguments
{
"url": "https://services.arcgisonline.com/arcgis/rest/services/Kamloops/FeatureServer/0",
"where": "1=1",
"out_fields": "*",
"limit": 50
}
curl
curl -X POST https://gateway.pipeworx.io/arcgis-kamloops/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_layer","arguments":{"url":"https://services.arcgisonline.com/arcgis/rest/services/Kamloops/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.arcgisonline.com/arcgis/rest/services/Kamloops/FeatureServer/0",
"where": "1=1",
"out_fields": "*",
"limit": 50
});
More examples
{
"url": "https://services.arcgisonline.com/arcgis/rest/services/Kamloops/FeatureServer/1",
"where": "ZONE = 'Residential'",
"out_fields": "PARCEL_ID,OWNER,ZONE",
"limit": 100
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"arcgis-kamloops": {
"url": "https://gateway.pipeworx.io/arcgis-kamloops/mcp"
}
}
}
See Getting Started for client-specific install steps.