@urbankitstudio/mcp-atlas 0.2.26 → 0.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,7 +8,7 @@ Query the parcel ArcGIS REST endpoints of 306 counties across 51 US states (50 s
8
8
 
9
9
  An [MCP](https://modelcontextprotocol.io) server that gives AI assistants direct access to UrbanKit Studio's atlas of manually verified county parcel GIS services. Ask Claude or Cursor to find the ArcGIS REST endpoint for any covered county, get the exact owner-search query URL, and look up parcel data — without needing to know anything about ArcGIS REST API conventions.
10
10
 
11
- **Coverage:** 306 counties across 51 US states (50 states plus DC), 324 endpoints, 323 of them live (atlas 0.6.29).
11
+ **Coverage:** 306 counties across 51 US states (50 states plus DC), 324 endpoints, 323 of them live (atlas 0.6.30).
12
12
 
13
13
  ---
14
14
 
@@ -87,4 +87,14 @@ export declare function ownerWhereClause(field: string, scopeWhere: string | nul
87
87
  export declare function ownerCoverageLabel(county: CountyPolicyFields & {
88
88
  endpoints: readonly EndpointSearchPolicyFields[];
89
89
  }): string;
90
+ /**
91
+ * The ready-to-fire owner query URL for an endpoint, or "" when no owner column
92
+ * is offered. `resultRecordCount=25` is added ONLY where the layer pages: a
93
+ * layer flagged `supportsPagination: false` answers that parameter with HTTP 200
94
+ * and a 400 error body instead of rows. The rule is the package's
95
+ * `offersPagination`, read here, never re-derived.
96
+ */
97
+ export declare function buildArcgisOwnerQuery(endpoint: Pick<EndpointRecord, "url" | "searchFields" | "supportsPagination">, owner: OwnerSearchPolicy, ownerQuery: string): string;
98
+ /** The build_owner_query note on how many rows the query returns. */
99
+ export declare function ownerQueryRowsNote(endpoint: Pick<EndpointRecord, "supportsPagination" | "maxRecordCount">): string;
90
100
  export {};
@@ -31,7 +31,7 @@
31
31
  * (FDOR `CO_NO=23` is Miami-Dade), so an unscoped query returns the whole
32
32
  * state. ownerWhereClause ANDs the scope in front of every owner match.
33
33
  */
34
- import { isReviewedUnservable, reviewedCapability } from "@urbankitstudio/atlas";
34
+ import { isReviewedUnservable, offersPagination, reviewedCapability } from "@urbankitstudio/atlas";
35
35
  // THE OWNER-COLUMN TEST, copied VERBATIM from the UKS canonical classifier:
36
36
  // urbankitstudio/src/lib/enrich-core.ts lines 48 (OWNER_RE) and 58
37
37
  // (OWNER_EXCLUDE), applied there by firstMatch to `${name} ${label}`. The two
@@ -121,3 +121,35 @@ export function ownerCoverageLabel(county) {
121
121
  return "APN only (owner column not searchable)";
122
122
  return "APN only";
123
123
  }
124
+ /**
125
+ * The ready-to-fire owner query URL for an endpoint, or "" when no owner column
126
+ * is offered. `resultRecordCount=25` is added ONLY where the layer pages: a
127
+ * layer flagged `supportsPagination: false` answers that parameter with HTTP 200
128
+ * and a 400 error body instead of rows. The rule is the package's
129
+ * `offersPagination`, read here, never re-derived.
130
+ */
131
+ export function buildArcgisOwnerQuery(endpoint, owner, ownerQuery) {
132
+ if (!owner.field)
133
+ return "";
134
+ const where = encodeURIComponent(ownerWhereClause(owner.field, owner.scopeWhere, ownerQuery));
135
+ const liveFields = endpoint.searchFields
136
+ .filter((sf) => sf.searchable)
137
+ .map((sf) => sf.name)
138
+ .join(",");
139
+ return (`${endpoint.url}/query` +
140
+ `?where=${where}` +
141
+ `&outFields=${liveFields}` +
142
+ `&returnGeometry=false` +
143
+ `&f=json` +
144
+ (offersPagination(endpoint) ? `&resultRecordCount=25` : ""));
145
+ }
146
+ /** The build_owner_query note on how many rows the query returns. */
147
+ export function ownerQueryRowsNote(endpoint) {
148
+ if (offersPagination(endpoint))
149
+ return "Returns up to 25 records";
150
+ const cap = typeof endpoint.maxRecordCount === "number"
151
+ ? `at most ${endpoint.maxRecordCount} records`
152
+ : "at most the layer's own record cap";
153
+ return (`This layer does not paginate, so the query carries no resultRecordCount and returns ${cap}; ` +
154
+ "exceededTransferLimit in the response says whether more matched, so narrow the where clause instead of paging");
155
+ }
package/dist/server.js CHANGED
@@ -18,7 +18,7 @@ import { readFileSync } from "node:fs";
18
18
  import { fileURLToPath } from "node:url";
19
19
  import { resolve, dirname } from "node:path";
20
20
  import { atlas, atlasIndex, slugify, countySlugFromName, } from "@urbankitstudio/atlas";
21
- import { ownerSearchPolicy, ownerWhereClause, ownerCoverageLabel, escapeSqlLiteral, } from "./search-policy.js";
21
+ import { ownerSearchPolicy, ownerWhereClause, ownerCoverageLabel, buildArcgisOwnerQuery, ownerQueryRowsNote, escapeSqlLiteral, } from "./search-policy.js";
22
22
  // Re-exported so the package's public surface is unchanged by the move.
23
23
  export { escapeSqlLiteral };
24
24
  const PKG_VERSION = JSON.parse(readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), "../package.json"), "utf8")).version;
@@ -55,21 +55,6 @@ function scopeLine(owner) {
55
55
  ? `Scope: ${owner.scopeWhere} (shared layer; AND this into every query)`
56
56
  : null;
57
57
  }
58
- function buildArcgisOwnerQuery(endpoint, owner, ownerQuery) {
59
- if (!owner.field)
60
- return "";
61
- const where = encodeURIComponent(ownerWhereClause(owner.field, owner.scopeWhere, ownerQuery));
62
- const liveFields = endpoint.searchFields
63
- .filter((sf) => sf.searchable)
64
- .map((sf) => sf.name)
65
- .join(",");
66
- return (`${endpoint.url}/query` +
67
- `?where=${where}` +
68
- `&outFields=${liveFields}` +
69
- `&returnGeometry=false` +
70
- `&f=json` +
71
- `&resultRecordCount=25`);
72
- }
73
58
  function formatCountySummary(c) {
74
59
  const epSummary = c.endpoints.length === 0
75
60
  ? "no REST endpoint mapped"
@@ -443,7 +428,7 @@ server.registerTool("build_owner_query", {
443
428
  queryUrl,
444
429
  ``,
445
430
  `Notes:`,
446
- ` - Returns up to 25 records`,
431
+ ` - ${ownerQueryRowsNote(ep)}`,
447
432
  ` - Partial name match (e.g. "SMITH" matches "SMITH JOHN" and "BLACKSMITH LLC")`,
448
433
  ` - Case-insensitive`,
449
434
  ` - Add &token=<your-token> if the service requires auth (this county is public)`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urbankitstudio/mcp-atlas",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "mcpName": "io.github.urbankitstudio/mcp-atlas",
5
5
  "description": "Query the parcel ArcGIS REST endpoints of 306 counties across 51 US states (50 states plus DC), 324 endpoints total, for owner, APN and address lookup via the Model Context Protocol (MCP).",
6
6
  "keywords": [
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@modelcontextprotocol/sdk": "^1.32.1",
51
- "@urbankitstudio/atlas": "^0.6.29"
51
+ "@urbankitstudio/atlas": "^0.6.30"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^26.0.0",