@cyanheads/geonames-mcp-server 0.1.2 → 0.2.0

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.
Files changed (69) hide show
  1. package/AGENTS.md +31 -17
  2. package/CLAUDE.md +31 -17
  3. package/Dockerfile +22 -7
  4. package/README.md +66 -122
  5. package/changelog/0.1.x/0.1.3.md +46 -0
  6. package/changelog/0.2.x/0.2.0.md +37 -0
  7. package/dist/index.js +2 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/mcp-server/tools/definitions/find-postal-codes.tool.d.ts +8 -5
  10. package/dist/mcp-server/tools/definitions/find-postal-codes.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/find-postal-codes.tool.js +84 -42
  12. package/dist/mcp-server/tools/definitions/find-postal-codes.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/get-children.tool.d.ts +6 -0
  14. package/dist/mcp-server/tools/definitions/get-children.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/get-children.tool.js +35 -18
  16. package/dist/mcp-server/tools/definitions/get-children.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/get-countries.tool.d.ts +6 -0
  18. package/dist/mcp-server/tools/definitions/get-countries.tool.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/get-countries.tool.js +32 -14
  20. package/dist/mcp-server/tools/definitions/get-countries.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/definitions/get-hierarchy.tool.js +3 -3
  22. package/dist/mcp-server/tools/definitions/get-hierarchy.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/get-place.tool.d.ts +3 -1
  24. package/dist/mcp-server/tools/definitions/get-place.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/get-place.tool.js +35 -11
  26. package/dist/mcp-server/tools/definitions/get-place.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/index.d.ts +37 -5
  28. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts +6 -0
  30. package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts.map +1 -1
  31. package/dist/mcp-server/tools/definitions/list-reference.tool.js +34 -14
  32. package/dist/mcp-server/tools/definitions/list-reference.tool.js.map +1 -1
  33. package/dist/mcp-server/tools/definitions/reverse-geocode.tool.d.ts.map +1 -1
  34. package/dist/mcp-server/tools/definitions/reverse-geocode.tool.js +85 -28
  35. package/dist/mcp-server/tools/definitions/reverse-geocode.tool.js.map +1 -1
  36. package/dist/mcp-server/tools/definitions/search-places.tool.d.ts +12 -2
  37. package/dist/mcp-server/tools/definitions/search-places.tool.d.ts.map +1 -1
  38. package/dist/mcp-server/tools/definitions/search-places.tool.js +107 -26
  39. package/dist/mcp-server/tools/definitions/search-places.tool.js.map +1 -1
  40. package/dist/mcp-server/tools/shared-inputs.d.ts +62 -20
  41. package/dist/mcp-server/tools/shared-inputs.d.ts.map +1 -1
  42. package/dist/mcp-server/tools/shared-inputs.js +94 -29
  43. package/dist/mcp-server/tools/shared-inputs.js.map +1 -1
  44. package/dist/services/geonames/country-codes.d.ts +7 -1
  45. package/dist/services/geonames/country-codes.d.ts.map +1 -1
  46. package/dist/services/geonames/country-codes.js +15 -1
  47. package/dist/services/geonames/country-codes.js.map +1 -1
  48. package/dist/services/geonames/geonames-service.d.ts +7 -3
  49. package/dist/services/geonames/geonames-service.d.ts.map +1 -1
  50. package/dist/services/geonames/geonames-service.js +85 -35
  51. package/dist/services/geonames/geonames-service.js.map +1 -1
  52. package/dist/services/geonames/response-parsers.d.ts +9 -5
  53. package/dist/services/geonames/response-parsers.d.ts.map +1 -1
  54. package/dist/services/geonames/response-parsers.js +102 -22
  55. package/dist/services/geonames/response-parsers.js.map +1 -1
  56. package/dist/services/geonames/types.d.ts +30 -13
  57. package/dist/services/geonames/types.d.ts.map +1 -1
  58. package/dist/services/geonames/types.js +4 -3
  59. package/dist/services/geonames/types.js.map +1 -1
  60. package/dist/services/geonames/upstream-errors.d.ts.map +1 -1
  61. package/dist/services/geonames/upstream-errors.js +7 -7
  62. package/dist/services/geonames/upstream-errors.js.map +1 -1
  63. package/dist/utils/inline-text.d.ts +57 -12
  64. package/dist/utils/inline-text.d.ts.map +1 -1
  65. package/dist/utils/inline-text.js +137 -20
  66. package/dist/utils/inline-text.js.map +1 -1
  67. package/package.json +15 -13
  68. package/server.json +10 -24
  69. package/skills/geonames-guide/SKILL.md +64 -0
@@ -1,18 +1,20 @@
1
1
  /**
2
2
  * @fileoverview geonames_search_places — searches the GeoNames gazetteer by name and
3
- * filters (country, feature class or code, population tier, bounding box) through
3
+ * filters (country, admin code, feature class or code, population tier, bounding box) through
4
4
  * `searchJSON`, one credit a call, cached for an hour.
5
5
  * @module mcp-server/tools/definitions/search-places.tool
6
6
  */
7
7
  import { tool, z } from '@cyanheads/mcp-ts-core';
8
8
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
- import { blankAsUnset, citiesInput, countriesInput, featureClassesInput, featureCodesInput, featureFilterMismatch, geonamesUsernameInput, isBlank, limitInput, lowerCased, offsetInput, USERNAME_ALIASES, unknownCountryCodes, } from '../shared-inputs.js';
9
+ import { blankAsUnset, citiesInput, clampedLimitInput, clampLimit, countriesInput, featureClassesInput, featureCodesInput, featureFilterMismatch, geonamesUsernameInput, isBlank, lowerCased, offsetInput, USERNAME_ALIASES, unknownCountryCodes, unlistedCountriesFragment, } from '../shared-inputs.js';
10
10
  import { getFeatureCode } from '../../../services/geonames/feature-codes.js';
11
11
  import { getGeoNamesService } from '../../../services/geonames/geonames-service.js';
12
- import { inlineText, tableCell } from '../../../utils/inline-text.js';
12
+ import { inlineText, renderNotice, tableCell } from '../../../utils/inline-text.js';
13
13
  const MATCHES = ['name_required', 'any_field', 'exact_name', 'name_prefix'];
14
14
  /** GeoNames' free service pages no further than `startRow=5000` (status 25 beyond). */
15
15
  const MAX_OFFSET = 5000;
16
+ /** Most places a call returns. GeoNames allows `maxRows=1000`; 100 keeps a page near 45 KB. */
17
+ const MAX_LIMIT = 100;
16
18
  /** The search row as this tool returns it: the gazetteer fields minus nearby and country-id extras. */
17
19
  const toPlace = ({ countryGeonameId: _countryId, distanceInKm: _distance, ...place }) => place;
18
20
  const orNotAvailable = (value) => value === undefined ? 'Not available' : tableCell(value);
@@ -30,14 +32,50 @@ const bound = () => z.number({
30
32
  ? `${input === undefined ? 'Missing' : 'Blank'} bound: give all four bounds as numbers, or omit boundingBox to search without a box`
31
33
  : undefined,
32
34
  });
35
+ /**
36
+ * An admin code as GeoNames writes it, 1 to 20 letters or digits. It is trimmed and its
37
+ * ASCII letters upper-cased before the pattern runs, otherwise kept verbatim, since zero
38
+ * padding is significant (`02` is Bavaria, `2` matches nothing). The advertised pattern
39
+ * admits the whitespace and lower case that normalization removes, so a validating client
40
+ * sends every form the tool accepts; only ASCII is upper-cased, so a letter whose upper
41
+ * case is ASCII (`ſ`) stays refused, as the pattern refuses it.
42
+ */
43
+ const adminCodeInput = (description) => blankAsUnset(z.preprocess((value) => typeof value === 'string'
44
+ ? value.replace(/[a-z]+/g, (letters) => letters.toUpperCase())
45
+ : value, z
46
+ .string()
47
+ .regex(/^\s*[A-Za-z0-9]{1,20}\s*$/)
48
+ .optional())).describe(description);
49
+ const LIST = new Intl.ListFormat('en', { type: 'conjunction' });
50
+ /** The admin_code_unscoped message: the codes given, what they lack, and why it matters. */
51
+ function unscopedMessage(codes, missing, countries) {
52
+ const needsCountry = missing.includes('countries');
53
+ const needs = [
54
+ missing.includes('adminCode1') && 'adminCode1',
55
+ needsCountry && 'exactly one country in countries',
56
+ ].filter(Boolean);
57
+ const why = missing.length === 2
58
+ ? 'admin codes repeat across countries and lower-level codes across first-level divisions'
59
+ : needsCountry
60
+ ? 'admin codes repeat across countries'
61
+ : 'lower-level codes repeat across first-level divisions';
62
+ const has = needsCountry
63
+ ? `; countries has ${countries.length === 0 ? 'none' : countries.join(', ')}`
64
+ : '';
65
+ return `${LIST.format(codes)} ${codes.length === 1 ? 'needs' : 'need'} ${needs.join(' and ')}, since ${why}${has}.`;
66
+ }
33
67
  export const searchPlacesTool = tool('geonames_search_places', {
34
68
  title: 'Search GeoNames places',
35
- description: 'Search the GeoNames gazetteer of 13M+ places by name and filters: country, feature class (P populated places, A admin divisions, T mountains and terrain, H water, S buildings and spots), feature code (PPLC capitals, ADM1 states, MT mountains, AIRP airports), population tier, and bounding box. Results carry the geonameId that geonames_get_place, geonames_get_hierarchy, and geonames_get_children take. The default match requires a query term in the place name while letting other terms match the country or admin names ("Berlin, Germany"). Costs 1 GeoNames credit per call.',
69
+ description: 'Search the GeoNames gazetteer of 13M+ places by name and filters: country, admin division by its GeoNames code (adminCode1 TX with countries US for Texas), feature class (P populated places, A admin divisions, T mountains and terrain, H water, S buildings and spots), feature code (PPLC capitals, ADM1 states, MT mountains, AIRP airports), population tier, and bounding box. Results carry the geonameId that geonames_get_place, geonames_get_hierarchy, and geonames_get_children take. The default match requires a query term in the place name while letting other terms match the country or admin names ("Berlin, Germany"). Costs 1 GeoNames credit per call.',
36
70
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
37
71
  input: z.object({
38
72
  query: blankAsUnset(z.string().max(200).optional()).describe('Place name to search for, such as Springfield or "Berlin, Germany", up to 200 characters. match sets how it is compared. Omit it to search by filters alone, which then needs at least one of countries, featureClasses, featureCodes, or boundingBox (cities alone is not enough).'),
39
- match: blankAsUnset(lowerCased(z.enum(MATCHES).optional())).describe('How query is matched. name_required (the default) needs at least one query term in the place name while other terms may match the country or admin names; any_field lets every term match any of those fields; exact_name matches the whole name exactly, alternate and historical names included; name_prefix matches names that start with query. Needs query. Case-insensitive.'),
73
+ match: blankAsUnset(lowerCased(z.enum(MATCHES).optional())).describe('How query is matched. name_required (the default) needs at least one query term in the place name while other terms may match the country or admin names; any_field lets every term match any of those fields; exact_name matches the whole name exactly, alternate and historical names included; name_prefix matches names that start with query. Needs query.'),
40
74
  countries: countriesInput,
75
+ adminCode1: adminCodeInput('First-level admin division (state, province, region) to search inside, by its GeoNames admin code: TX is Texas in US. Take it from geonames_get_place or geonames_reverse_geocode (adminLevels[].code at level 1), or from adminCode1 on rows of geonames_search_places, geonames_get_hierarchy, and geonames_get_children. GeoNames codes are neither ISO 3166-2 nor postal admin codes: Bavaria is 02, not BY. Needs exactly one country in countries. 1 to 20 letters or digits, zero padding kept (02, not 2). Case-insensitive.'),
76
+ adminCode2: adminCodeInput('Second-level admin division (a US county, a French département) to search inside, by its GeoNames admin code: 033 is King County in WA. Take it from geonames_get_place or geonames_reverse_geocode (adminLevels[].code at level 2). Needs adminCode1 and exactly one country in countries. 1 to 20 letters or digits, zero padding kept (033, not 33). Case-insensitive.'),
77
+ adminCode3: adminCodeInput('Third-level admin division to search inside, by its GeoNames admin code: 09162 is Munich in DE. Take it from geonames_get_place or geonames_reverse_geocode (adminLevels[].code at level 3). Needs adminCode1 and exactly one country in countries. 1 to 20 letters or digits, zero padding kept. Case-insensitive.'),
78
+ adminCode4: adminCodeInput('Fourth-level admin division to search inside, by its GeoNames admin code: 92012 is Boulogne-Billancourt in FR. Take it from geonames_get_place or geonames_reverse_geocode (adminLevels[].code at level 4). Needs adminCode1 and exactly one country in countries. 1 to 20 letters or digits, zero padding kept. Case-insensitive.'),
41
79
  featureClasses: featureClassesInput,
42
80
  featureCodes: featureCodesInput,
43
81
  cities: citiesInput,
@@ -62,8 +100,8 @@ export const searchPlacesTool = tool('geonames_search_places', {
62
100
  })
63
101
  .strict()
64
102
  .optional()).describe('Keep only places inside this box. The box cannot cross the 180° meridian: split such an area into two searches.'),
65
- orderBy: blankAsUnset(lowerCased(z.enum(['relevance', 'population']).optional())).describe("Result order: relevance (GeoNames' default) or population, largest first. Case-insensitive."),
66
- limit: limitInput(100, 10),
103
+ orderBy: blankAsUnset(lowerCased(z.enum(['relevance', 'population']).optional())).describe("Result order: relevance or population, largest first. Omit it for GeoNames' own order, which matches relevance except with match name_prefix."),
104
+ limit: clampedLimitInput(MAX_LIMIT, 10),
67
105
  offset: offsetInput(MAX_OFFSET),
68
106
  geonamesUsername: geonamesUsernameInput,
69
107
  }),
@@ -133,8 +171,15 @@ export const searchPlacesTool = tool('geonames_search_places', {
133
171
  .describe('The match mode, query, and filters as the server sent them to GeoNames.'),
134
172
  truncated: z.boolean().describe('True when more matching places remain past this page.'),
135
173
  shown: z.number().describe('Places returned on this page.'),
136
- cap: z.number().describe('The limit that was applied.'),
137
- notice: z.string().optional().describe('Guidance when nothing matched or more pages remain.'),
174
+ cap: z.number().describe('The limit applied: limit as given, or 100 when it asked for more.'),
175
+ notice: z
176
+ .string()
177
+ .optional()
178
+ .describe('Guidance: why nothing matched, or how to reach the next page (naming a limit held to 100), and which places on the page lie in countries that countries does not list.'),
179
+ },
180
+ enrichmentTrailer: {
181
+ effectiveQuery: { render: (value) => `**effectiveQuery:** ${inlineText(value)}` },
182
+ notice: { render: renderNotice },
138
183
  },
139
184
  errors: [
140
185
  {
@@ -154,7 +199,7 @@ export const searchPlacesTool = tool('geonames_search_places', {
154
199
  {
155
200
  reason: 'unknown_country_code',
156
201
  code: JsonRpcErrorCode.ValidationError,
157
- when: 'A countries entry is a well-formed alpha-3 or three-digit numeric code that no country has.',
202
+ when: 'A countries entry, once mapped to alpha-2, is none of the 250 country codes or the retired AN, CS, and YU: an alpha-2 such as EL or EU, or an unassigned alpha-3 or numeric code.',
158
203
  recovery: 'Find the country with geonames_get_countries (nameContains matches its name), then call again with its alpha-2, alpha-3, or numeric code.',
159
204
  severity: 'notice',
160
205
  },
@@ -165,6 +210,13 @@ export const searchPlacesTool = tool('geonames_search_places', {
165
210
  recovery: 'Look up valid codes with geonames_list_reference topic feature_codes, then retry with a listed code.',
166
211
  severity: 'notice',
167
212
  },
213
+ {
214
+ reason: 'admin_code_unscoped',
215
+ code: JsonRpcErrorCode.ValidationError,
216
+ when: 'An admin code is set without exactly one country in countries, or adminCode2 to adminCode4 without adminCode1: codes repeat across countries, and lower-level codes across first-level divisions.',
217
+ recovery: 'Call geonames_search_places again with exactly one country in countries and, beside adminCode2 to adminCode4, the adminCode1 they belong to; geonames_get_place lists the codes of every level in adminLevels.',
218
+ severity: 'notice',
219
+ },
168
220
  {
169
221
  reason: 'feature_filter_mismatch',
170
222
  code: JsonRpcErrorCode.ValidationError,
@@ -221,10 +273,15 @@ export const searchPlacesTool = tool('geonames_search_places', {
221
273
  ],
222
274
  async handler(input, ctx) {
223
275
  const { query, countries, featureClasses, featureCodes, cities, boundingBox, orderBy } = input;
276
+ const { adminCode1, adminCode2, adminCode3, adminCode4 } = input;
224
277
  const match = query === undefined ? undefined : (input.match ?? 'name_required');
278
+ /** The admin codes given, first level first, each as `adminCodeN CODE`. */
279
+ const adminCodes = Object.entries({ adminCode1, adminCode2, adminCode3, adminCode4 }).flatMap(([name, code]) => (code === undefined ? [] : [`${name} ${code}`]));
280
+ const limit = clampLimit(input.limit, MAX_LIMIT);
225
281
  const effectiveQuery = [
226
- query === undefined ? undefined : `${match} "${inlineText(query)}"`,
282
+ query === undefined ? undefined : `${match} "${query}"`,
227
283
  countries && `countries ${countries.join(',')}`,
284
+ ...adminCodes,
228
285
  featureClasses && `featureClasses ${featureClasses.join(',')}`,
229
286
  featureCodes && `featureCodes ${featureCodes.join(',')}`,
230
287
  cities && `cities ${cities}`,
@@ -234,7 +291,7 @@ export const searchPlacesTool = tool('geonames_search_places', {
234
291
  ]
235
292
  .filter(Boolean)
236
293
  .join(' · ');
237
- ctx.enrich({ totalCount: 0, truncated: false, shown: 0, cap: input.limit, effectiveQuery });
294
+ ctx.enrich({ totalCount: 0, truncated: false, shown: 0, cap: limit.applied, effectiveQuery });
238
295
  if (input.match !== undefined && query === undefined) {
239
296
  throw ctx.fail('query_required', `match ${input.match} needs query text to match.`);
240
297
  }
@@ -243,7 +300,7 @@ export const searchPlacesTool = tool('geonames_search_places', {
243
300
  featureClasses === undefined &&
244
301
  featureCodes === undefined &&
245
302
  boundingBox === undefined) {
246
- throw ctx.fail('query_or_filter_required', `geonames_search_places needs query or a narrowing filter (countries, featureClasses, featureCodes, boundingBox)${cities === undefined ? '' : '; cities alone does not narrow enough'}.`);
303
+ throw ctx.fail('query_or_filter_required', `geonames_search_places needs query or a narrowing filter (countries, featureClasses, featureCodes, boundingBox)${cities === undefined ? '' : '; cities alone does not narrow enough'}${adminCodes.length === 0 ? '' : '; admin codes also need exactly one country in countries'}.`);
247
304
  }
248
305
  const unknownCountries = unknownCountryCodes(countries);
249
306
  if (unknownCountries !== undefined) {
@@ -254,6 +311,18 @@ export const searchPlacesTool = tool('geonames_search_places', {
254
311
  if (unknownCodes.length > 0) {
255
312
  throw ctx.fail('unknown_feature_code', `Not a GeoNames feature code: ${unknownCodes.join(', ')}.`, { featureCodes: unknownCodes });
256
313
  }
314
+ if (adminCodes.length > 0) {
315
+ const scope = [...new Set(countries)];
316
+ const missing = [
317
+ adminCode1 === undefined && 'adminCode1',
318
+ scope.length !== 1 && 'countries',
319
+ ].filter((gap) => gap !== false);
320
+ if (missing.length > 0) {
321
+ throw ctx.fail('admin_code_unscoped', unscopedMessage(adminCodes, missing, scope), {
322
+ missing,
323
+ });
324
+ }
325
+ }
257
326
  const mismatch = featureFilterMismatch({ featureClasses, featureCodes, cities });
258
327
  if (mismatch !== undefined) {
259
328
  const { message, ...offending } = mismatch;
@@ -273,11 +342,15 @@ export const searchPlacesTool = tool('geonames_search_places', {
273
342
  }
274
343
  const service = getGeoNamesService();
275
344
  const { places, totalCount } = await service.search({
276
- limit: input.limit,
345
+ limit: limit.applied,
277
346
  offset: input.offset,
278
347
  query,
279
348
  match,
280
349
  countries,
350
+ adminCode1,
351
+ adminCode2,
352
+ adminCode3,
353
+ adminCode4,
281
354
  featureClasses,
282
355
  featureCodes,
283
356
  cities,
@@ -289,34 +362,40 @@ export const searchPlacesTool = tool('geonames_search_places', {
289
362
  const more = shown > 0 && next < totalCount;
290
363
  /** Past the cap, offset 5000 is still a page: it repeats this page's tail, then reaches row `next`. */
291
364
  const nextOffset = more && input.offset < MAX_OFFSET ? Math.min(next, MAX_OFFSET) : undefined;
365
+ /** The notice's fragments: clamp, continuation, outside countries; or the zero-hit notice alone. */
366
+ const fragments = [];
292
367
  ctx.enrich.total(totalCount);
293
368
  ctx.enrich({ shown });
294
369
  if (more) {
370
+ ctx.enrich.truncated({ shown, cap: limit.applied });
295
371
  const remaining = `${(totalCount - next).toLocaleString('en-US')} more ${totalCount - next === 1 ? 'place' : 'places'}`;
296
372
  const repeated = next - MAX_OFFSET;
297
- ctx.enrich.truncated({
298
- shown,
299
- cap: input.limit,
300
- guidance: nextOffset === undefined
301
- ? "GeoNames' free service accepts no offset past 5,000, so no later page is reachable; narrow with countries, featureCodes, or boundingBox to reach the rest."
302
- : nextOffset < next
303
- ? `${remaining}; call again with offset ${MAX_OFFSET}, the last offset GeoNames' free service accepts (its first ${repeated} ${repeated === 1 ? 'row repeats' : 'rows repeat'} this page).`
304
- : `${remaining}; call again with offset ${next}.`,
305
- });
373
+ if (limit.fragment !== undefined)
374
+ fragments.push(limit.fragment);
375
+ fragments.push(nextOffset === undefined
376
+ ? "GeoNames' free service accepts no offset past 5,000, so no later page is reachable; narrow with countries, featureCodes, or boundingBox to reach the rest."
377
+ : nextOffset < next
378
+ ? `${remaining}; call again with offset ${MAX_OFFSET}, the last offset GeoNames' free service accepts (its first ${repeated} ${repeated === 1 ? 'row repeats' : 'rows repeat'} this page).`
379
+ : `${remaining}; call again with offset ${next}.`);
306
380
  }
381
+ const unlisted = unlistedCountriesFragment(places.map(({ countryCode }) => countryCode), countries, 'place');
382
+ if (unlisted !== undefined)
383
+ fragments.push(unlisted);
307
384
  if (shown === 0) {
308
- ctx.enrich.notice(totalCount > 0
385
+ fragments.push(totalCount > 0
309
386
  ? `offset ${input.offset} is past the last result (${totalCount}); call again with a smaller offset.`
310
387
  : [
311
388
  `No GeoNames place matched ${effectiveQuery}.`,
312
389
  match === 'exact_name' &&
313
- `No place is named exactly "${inlineText(query ?? '')}"; retry with match name_prefix or name_required.`,
390
+ `No place is named exactly "${query ?? ''}"; retry with match name_prefix or name_required.`,
314
391
  match === 'name_required' &&
315
392
  'At least one query term must appear in the place name; retry with match any_field to also match country and admin names.',
316
393
  (featureCodes || featureClasses) &&
317
394
  'The feature filter may be too narrow; drop it, or check codes with geonames_list_reference topic feature_codes.',
318
395
  countries &&
319
- `Only ${countries.join(', ')} were searched, and a code GeoNames does not know matches nothing; check the codes with geonames_get_countries, or drop countries to search worldwide.`,
396
+ `Only ${countries.join(', ')} were searched; check the codes with geonames_get_countries, or drop countries to search worldwide.`,
397
+ adminCodes.length > 0 &&
398
+ `Only places with ${adminCodes.join(', ')} were searched; admin codes match exactly, zero padding included: copy them from adminLevels of geonames_get_place, or drop the deepest to widen the search.`,
320
399
  boundingBox &&
321
400
  'Only places inside the bounding box were searched; widen or drop boundingBox.',
322
401
  cities && `${cities} excludes smaller populated places; drop cities to include them.`,
@@ -324,6 +403,8 @@ export const searchPlacesTool = tool('geonames_search_places', {
324
403
  .filter(Boolean)
325
404
  .join(' '));
326
405
  }
406
+ if (fragments.length > 0)
407
+ ctx.enrich.notice(fragments.join(' '));
327
408
  return { places: places.map(toPlace), ...(nextOffset === undefined ? {} : { nextOffset }) };
328
409
  },
329
410
  format: (result) => {
@@ -1 +1 @@
1
- {"version":3,"file":"search-places.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-places.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,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AO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"search-places.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-places.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,OAAO,EACP,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE7E,MAAM,OAAO,GAAG,CAAC,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,CAAU,CAAC;AAErF,uFAAuF;AACvF,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,+FAA+F;AAC/F,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB,uGAAuG;AACvG,MAAM,OAAO,GAAG,CAAC,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,KAAK,EAAW,EAAE,EAAE,CAC/F,KAAK,CAAC;AAER,MAAM,cAAc,GAAG,CAAC,KAAyB,EAAU,EAAE,CAC3D,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAA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,GAAG,CAAC,CAAC;gBACnB,MAAM,WAAW,GACf,KAAK,CAAC,GAAG,KAAK,SAAS,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS;oBAChD,CAAC,CAAC,eAAe;oBACjB,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,EAAE,CAAC;gBACnC,KAAK,CAAC,IAAI,CACR,KAAK;oBACH,KAAK,CAAC,SAAS;oBACf,IAAI;oBACJ,OAAO;oBACP,OAAO;oBACP,MAAM;oBACN,KAAK,CAAC,UAAU,KAAK,SAAS;wBAC5B,CAAC,CAAC,eAAe;wBACjB,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC;oBAC5C,WAAW;iBACZ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAClB,CAAC;YACJ,CAAC;QACH,CAAC;QACD,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,qBAAqB,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;QAC/F,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -3,8 +3,9 @@
3
3
  * Normalizations run in the schema, before validation: blanks from form clients
4
4
  * become unset, lists accept a comma-separated string, codes are upper-cased (country
5
5
  * codes mapped to alpha-2), and word enums are lower-cased. Also the checks tools run
6
- * before any request: country codes no country has, and feature filters that intersect
7
- * to nothing.
6
+ * before any request: country codes GeoNames files no feature under, feature filters
7
+ * that intersect to nothing, and the clamp that holds a limit to the tool's cap; and, once
8
+ * a page is back, the notice fragment naming the territories a country filter also returned.
8
9
  * @module mcp-server/tools/shared-inputs
9
10
  */
10
11
  import { z } from '@cyanheads/mcp-ts-core';
@@ -25,15 +26,19 @@ export interface ListInputOptions {
25
26
  }
26
27
  /**
27
28
  * An optional list that also accepts a comma-separated string. Items are trimmed and
28
- * normalized, blanks dropped, and an empty list is unset.
29
+ * normalized, blanks dropped, and an empty list is unset. The advertised schema is the array
30
+ * alone, so a description offers only the list; the joined string is tolerated.
29
31
  */
30
32
  export declare function listInput<T extends z.ZodType>(item: T, { max, normalize }: ListInputOptions): z.ZodPreprocess<z.ZodOptional<z.ZodArray<T>>, unknown>;
31
- /** Lower-cases a string before `schema` validates it, so a word enum accepts any case (`Tourism`). */
33
+ /**
34
+ * Lower-cases a string before `schema` validates it, so a word enum accepts any case (`Tourism`).
35
+ * The advertised enum lists only the lower-case members, so the description offers only those.
36
+ */
32
37
  export declare const lowerCased: <T extends z.ZodType>(schema: T) => z.ZodPreprocess<T, unknown>;
33
38
  /**
34
39
  * Upper-cases a country code and maps it to the alpha-2 GeoNames keys countries by: `UK`
35
- * (ISO's exceptionally reserved code for the United Kingdom) to `GB`, and an alpha-3 or
36
- * three-digit numeric code to its country's alpha-2. A code no country has stays, upper-cased.
40
+ * to `GB` and `FL` to `LI` (see {@link COUNTRY_ALIASES}), and an alpha-3 or three-digit
41
+ * numeric code to its country's alpha-2. A code no country has stays, upper-cased.
37
42
  */
38
43
  export declare const toAlpha2: (item: string) => string;
39
44
  /** Optional caller GeoNames account; never logged, cached, or echoed. */
@@ -45,35 +50,50 @@ export declare const USERNAME_ALIASES: {
45
50
  /**
46
51
  * Argument names `setup()` registers with `sanitization.setSensitiveFields`, so the
47
52
  * failed-call payload record redacts a username sent under a near-miss key. The framework
48
- * matches a key by its lower-cased alphanumerics and by its camelCase, snake_case, or
49
- * kebab-case words: `user` and `account` cover `geonames_user` and `GeoNamesAccount`, and
50
- * the run-together names cover all-caps keys such as `GEONAMES_USER`, which split into
51
- * single letters.
53
+ * splits a key into lower-cased words at separators, camelCase boundaries, the end of a run
54
+ * of capitals, and around digits, and matches every run of adjacent words, joined:
55
+ * `user` and `account` cover `geonames_user`, `GEONAMES_USER`, and `GeoNamesAccount`, and
56
+ * the run-together names cover a key written as one word, such as `geonamesuser` or
57
+ * `GEONAMESUSER`, which the word split leaves whole.
52
58
  */
53
59
  export declare const USERNAME_LOG_FIELDS: string[];
54
60
  /**
55
61
  * Required GeoNames feature id, as a digit string of at most {@link MAX_GEONAME_ID}. A
56
62
  * JSON integer becomes its digit string here, so an out-of-range one gets the range message.
63
+ * The advertised pattern admits only the digit string, so the description offers only that;
64
+ * the URL and integer forms are tolerated.
57
65
  */
58
66
  export declare const geonameIdInput: z.ZodPreprocess<z.ZodString, unknown>;
59
67
  /**
60
68
  * Optional country filter, up to 10 codes, each mapped to alpha-2 by {@link toAlpha2}. A
61
- * well-formed alpha-3 or numeric code no country has passes the schema for the tool to
62
- * reject; see {@link unknownCountryCodes}.
69
+ * well-formed code GeoNames files no feature under passes the schema for the tool to
70
+ * reject before any request; see {@link unknownCountryCodes}. GeoNames' `country` filter
71
+ * also returns the territories it files under a listed country, and the tools relay those
72
+ * rows as returned, so the description says so.
63
73
  */
64
74
  export declare const countriesInput: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
65
- /** `countries` entries no country has, and the message naming them. */
75
+ /** `countries` entries GeoNames files no feature under, and the message naming them. */
66
76
  export interface UnknownCountryCodes {
67
77
  /** Each entry as normalized, in input order. */
68
78
  countries: string[];
69
79
  message: string;
70
80
  }
71
81
  /**
72
- * The `countries` entries {@link toAlpha2} could not map: well-formed alpha-3 or numeric
73
- * codes no country has. Returns `undefined` when every entry is alpha-2; an alpha-2 code
74
- * GeoNames does not know still goes upstream and matches nothing.
82
+ * The `countries` entries GeoNames files no feature under: after {@link toAlpha2}, each
83
+ * entry outside the 250 country codes and the retired `AN`, `CS`, and `YU`, whether an
84
+ * alpha-2 such as `EL` or an alpha-3 or numeric code the table could not map. Returns
85
+ * `undefined` when every entry is one of those codes.
75
86
  */
76
87
  export declare function unknownCountryCodes(countries: readonly string[] | undefined): UnknownCountryCodes | undefined;
88
+ /**
89
+ * The notice fragment naming the countries on a page that `countries` (as the schema
90
+ * normalized it, alpha-2) does not list: the territories GeoNames' `country` filter returns
91
+ * under a listed country, relayed rather than dropped. Each code appears once, in page
92
+ * order, read from the page's own rows, so no parent-to-territory table is needed; a row
93
+ * with no `countryCode` is skipped. `noun` names one row of the page. Returns `undefined`
94
+ * without `countries` or when every code on the page is listed.
95
+ */
96
+ export declare function unlistedCountriesFragment(countryCodes: readonly (string | undefined)[], countries: readonly string[] | undefined, noun: 'place' | 'postal code'): string | undefined;
77
97
  /** Optional feature-class filter, up to all nine classes. */
78
98
  export declare const featureClassesInput: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
79
99
  A: "A";
@@ -120,15 +140,37 @@ export declare const latInput: z.ZodNumber;
120
140
  export declare const lngInput: z.ZodNumber;
121
141
  /** Optional local name filter; see {@link nameMatcher}. */
122
142
  export declare const nameContainsInput: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
123
- /** A `limit` input: 1–`max`, `fallback` when omitted or blank. */
124
- export declare const limitInput: (max: number, fallback: number) => z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
143
+ /** The `name_contains_unsearchable` message: a nonblank `nameContains` with no letter or digit. */
144
+ export declare const UNSEARCHABLE_NAME_MESSAGE = "nameContains has no letter or digit. Names are matched on their letters and digits alone, so this text would match every entry.";
145
+ /**
146
+ * A `limit` input for a tool that returns at most `cap` entries a call: 1 to 1,000, `fallback`
147
+ * when omitted or blank. The handler holds a value above `cap` to `cap` with {@link clampLimit}
148
+ * instead of rejecting a request it can answer up to the cap.
149
+ */
150
+ export declare const clampedLimitInput: (cap: number, fallback: number) => z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
151
+ /** A requested limit held to a tool's cap. */
152
+ export interface ClampedLimit {
153
+ /** The limit the tool applies and reports as `cap`: the request, or the cap when it asked for more. */
154
+ applied: number;
155
+ /** Names the requested value and the cap; present only when the request was above the cap. */
156
+ fragment?: string;
157
+ }
158
+ /**
159
+ * Holds `requested` to `cap`, before any request or slice. The tool writes `applied` as its
160
+ * `cap` enrichment, and puts `fragment` in its notice ahead of its continuation only on a page
161
+ * with entries remaining past it: a clamped call whose entries all fit says nothing of the
162
+ * clamp. `field` is the input's name as the fragment prints it.
163
+ */
164
+ export declare function clampLimit(requested: number, cap: number, field?: string): ClampedLimit;
125
165
  /** An `offset` input: entries to skip, 0 when omitted or blank. */
126
166
  export declare const offsetInput: (max?: number) => z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
127
167
  /**
128
168
  * Builds the strict token matcher behind `nameContains`: every word of `query` must
129
- * appear somewhere in the given fields.
169
+ * appear somewhere in the given fields. Returns `undefined` when `query` normalizes to no
170
+ * word (it holds no letter or digit), which would match everything; the tool rejects that
171
+ * as `name_contains_unsearchable` with {@link UNSEARCHABLE_NAME_MESSAGE}.
130
172
  */
131
- export declare function nameMatcher(query: string): (fields: readonly (string | undefined)[]) => boolean;
173
+ export declare function nameMatcher(query: string): ((fields: readonly (string | undefined)[]) => boolean) | undefined;
132
174
  /** One page of a locally held list. */
133
175
  export interface LocalPage<T> {
134
176
  /** Offset of the next page; absent on the last page. */
@@ -1 +1 @@
1
- {"version":3,"file":"shared-inputs.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/shared-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,sCAAsC,CAAC;AAE9C,4DAA4D;AAC5D,eAAO,MAAM,OAAO,UAAW,OAAO,KAAG,OACoD,CAAC;AAc9F;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,CAAC,CAAC,OAAO,UAAU,CAAC,gCAAuC,CAAC;AAEnG,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,6FAA6F;IAC7F,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE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