@cyanheads/geonames-mcp-server 0.0.0-stage → 0.1.1

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 (86) hide show
  1. package/AGENTS.md +438 -0
  2. package/CLAUDE.md +438 -0
  3. package/Dockerfile +177 -0
  4. package/LICENSE +201 -0
  5. package/README.md +316 -2
  6. package/changelog/0.1.x/0.1.0.md +9 -0
  7. package/changelog/0.1.x/0.1.1.md +22 -0
  8. package/changelog/template.md +151 -0
  9. package/dist/config/server-config.d.ts +13 -0
  10. package/dist/config/server-config.d.ts.map +1 -0
  11. package/dist/config/server-config.js +21 -0
  12. package/dist/config/server-config.js.map +1 -0
  13. package/dist/index.d.ts +8 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +30 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/mcp-server/tools/definitions/find-postal-codes.tool.d.ts +90 -0
  18. package/dist/mcp-server/tools/definitions/find-postal-codes.tool.d.ts.map +1 -0
  19. package/dist/mcp-server/tools/definitions/find-postal-codes.tool.js +262 -0
  20. package/dist/mcp-server/tools/definitions/find-postal-codes.tool.js.map +1 -0
  21. package/dist/mcp-server/tools/definitions/get-children.tool.d.ts +88 -0
  22. package/dist/mcp-server/tools/definitions/get-children.tool.d.ts.map +1 -0
  23. package/dist/mcp-server/tools/definitions/get-children.tool.js +248 -0
  24. package/dist/mcp-server/tools/definitions/get-children.tool.js.map +1 -0
  25. package/dist/mcp-server/tools/definitions/get-countries.tool.d.ts +90 -0
  26. package/dist/mcp-server/tools/definitions/get-countries.tool.d.ts.map +1 -0
  27. package/dist/mcp-server/tools/definitions/get-countries.tool.js +217 -0
  28. package/dist/mcp-server/tools/definitions/get-countries.tool.js.map +1 -0
  29. package/dist/mcp-server/tools/definitions/get-hierarchy.tool.d.ts +64 -0
  30. package/dist/mcp-server/tools/definitions/get-hierarchy.tool.d.ts.map +1 -0
  31. package/dist/mcp-server/tools/definitions/get-hierarchy.tool.js +168 -0
  32. package/dist/mcp-server/tools/definitions/get-hierarchy.tool.js.map +1 -0
  33. package/dist/mcp-server/tools/definitions/get-place.tool.d.ts +108 -0
  34. package/dist/mcp-server/tools/definitions/get-place.tool.d.ts.map +1 -0
  35. package/dist/mcp-server/tools/definitions/get-place.tool.js +300 -0
  36. package/dist/mcp-server/tools/definitions/get-place.tool.js.map +1 -0
  37. package/dist/mcp-server/tools/definitions/index.d.ts +735 -0
  38. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
  39. package/dist/mcp-server/tools/definitions/index.js +23 -0
  40. package/dist/mcp-server/tools/definitions/index.js.map +1 -0
  41. package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts +103 -0
  42. package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts.map +1 -0
  43. package/dist/mcp-server/tools/definitions/list-reference.tool.js +233 -0
  44. package/dist/mcp-server/tools/definitions/list-reference.tool.js.map +1 -0
  45. package/dist/mcp-server/tools/definitions/reverse-geocode.tool.d.ts +134 -0
  46. package/dist/mcp-server/tools/definitions/reverse-geocode.tool.d.ts.map +1 -0
  47. package/dist/mcp-server/tools/definitions/reverse-geocode.tool.js +381 -0
  48. package/dist/mcp-server/tools/definitions/reverse-geocode.tool.js.map +1 -0
  49. package/dist/mcp-server/tools/definitions/search-places.tool.d.ts +133 -0
  50. package/dist/mcp-server/tools/definitions/search-places.tool.d.ts.map +1 -0
  51. package/dist/mcp-server/tools/definitions/search-places.tool.js +348 -0
  52. package/dist/mcp-server/tools/definitions/search-places.tool.js.map +1 -0
  53. package/dist/mcp-server/tools/shared-inputs.d.ts +97 -0
  54. package/dist/mcp-server/tools/shared-inputs.d.ts.map +1 -0
  55. package/dist/mcp-server/tools/shared-inputs.js +156 -0
  56. package/dist/mcp-server/tools/shared-inputs.js.map +1 -0
  57. package/dist/services/geonames/feature-codes.d.ts +27 -0
  58. package/dist/services/geonames/feature-codes.d.ts.map +1 -0
  59. package/dist/services/geonames/feature-codes.js +723 -0
  60. package/dist/services/geonames/feature-codes.js.map +1 -0
  61. package/dist/services/geonames/geonames-service.d.ts +98 -0
  62. package/dist/services/geonames/geonames-service.d.ts.map +1 -0
  63. package/dist/services/geonames/geonames-service.js +555 -0
  64. package/dist/services/geonames/geonames-service.js.map +1 -0
  65. package/dist/services/geonames/response-cache.d.ts +24 -0
  66. package/dist/services/geonames/response-cache.d.ts.map +1 -0
  67. package/dist/services/geonames/response-cache.js +44 -0
  68. package/dist/services/geonames/response-cache.js.map +1 -0
  69. package/dist/services/geonames/response-parsers.d.ts +34 -0
  70. package/dist/services/geonames/response-parsers.d.ts.map +1 -0
  71. package/dist/services/geonames/response-parsers.js +350 -0
  72. package/dist/services/geonames/response-parsers.js.map +1 -0
  73. package/dist/services/geonames/types.d.ts +218 -0
  74. package/dist/services/geonames/types.d.ts.map +1 -0
  75. package/dist/services/geonames/types.js +10 -0
  76. package/dist/services/geonames/types.js.map +1 -0
  77. package/dist/services/geonames/upstream-errors.d.ts +54 -0
  78. package/dist/services/geonames/upstream-errors.d.ts.map +1 -0
  79. package/dist/services/geonames/upstream-errors.js +187 -0
  80. package/dist/services/geonames/upstream-errors.js.map +1 -0
  81. package/dist/utils/inline-text.d.ts +25 -0
  82. package/dist/utils/inline-text.d.ts.map +1 -0
  83. package/dist/utils/inline-text.js +60 -0
  84. package/dist/utils/inline-text.js.map +1 -0
  85. package/package.json +108 -4
  86. package/server.json +114 -0
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @fileoverview geonames_get_children — the direct children of a GeoNames feature in the
3
+ * administrative, tourism, geography, or dependency tree (`childrenJSON`, 1 credit,
4
+ * cached a day). The whole list is fetched once, so paging and name filtering are local.
5
+ * @module mcp-server/tools/definitions/get-children.tool
6
+ */
7
+ import { z } from '@cyanheads/mcp-ts-core';
8
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
+ export declare const getChildrenTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
10
+ geonameId: z.ZodPreprocess<z.ZodString, unknown>;
11
+ hierarchy: z.ZodPreprocess<z.ZodPreprocess<z.ZodDefault<z.ZodEnum<{
12
+ administrative: "administrative";
13
+ dependency: "dependency";
14
+ geography: "geography";
15
+ tourism: "tourism";
16
+ }>>, unknown>, unknown>;
17
+ nameContains: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
18
+ limit: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
19
+ offset: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
20
+ geonamesUsername: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ found: z.ZodBoolean;
23
+ parentGeonameId: z.ZodNumber;
24
+ hierarchy: z.ZodEnum<{
25
+ administrative: "administrative";
26
+ dependency: "dependency";
27
+ geography: "geography";
28
+ tourism: "tourism";
29
+ }>;
30
+ guidance: z.ZodOptional<z.ZodString>;
31
+ children: z.ZodArray<z.ZodObject<{
32
+ geonameId: z.ZodNumber;
33
+ name: z.ZodString;
34
+ toponymName: z.ZodString;
35
+ featureClass: z.ZodOptional<z.ZodString>;
36
+ featureCode: z.ZodOptional<z.ZodString>;
37
+ featureName: z.ZodOptional<z.ZodString>;
38
+ countryCode: z.ZodOptional<z.ZodString>;
39
+ adminCode1: z.ZodOptional<z.ZodString>;
40
+ adminName1: z.ZodOptional<z.ZodString>;
41
+ iso3166_2: z.ZodOptional<z.ZodString>;
42
+ lat: z.ZodOptional<z.ZodNumber>;
43
+ lng: z.ZodOptional<z.ZodNumber>;
44
+ population: z.ZodOptional<z.ZodNumber>;
45
+ }, z.core.$strip>>;
46
+ nextOffset: z.ZodOptional<z.ZodNumber>;
47
+ }, z.core.$strip>, readonly [{
48
+ readonly reason: "username_required";
49
+ readonly code: JsonRpcErrorCode.Unauthorized;
50
+ readonly when: "Neither geonamesUsername nor the server's GEONAMES_USERNAME supplies a GeoNames account.";
51
+ readonly recovery: "Call the tool again with geonamesUsername set to a free GeoNames account that has web services enabled, or ask the operator to set GEONAMES_USERNAME.";
52
+ readonly severity: "notice";
53
+ readonly thrownBy: "service";
54
+ }, {
55
+ readonly reason: "caller_account_rejected";
56
+ readonly code: JsonRpcErrorCode.Unauthorized;
57
+ readonly when: "GeoNames rejected the caller-supplied geonamesUsername (unknown user, or free web services not enabled).";
58
+ readonly recovery: "Enable free web services for that account on its GeoNames account page, or call the tool again without geonamesUsername to use the server's account.";
59
+ readonly severity: "notice";
60
+ readonly thrownBy: "service";
61
+ }, {
62
+ readonly reason: "server_account_rejected";
63
+ readonly code: JsonRpcErrorCode.ConfigurationError;
64
+ readonly when: "GeoNames rejected the server's GEONAMES_USERNAME.";
65
+ readonly recovery: "The operator must set GEONAMES_USERNAME to a registered account with free web services enabled; until then call the tool again with geonamesUsername set to your own account.";
66
+ readonly thrownBy: "service";
67
+ }, {
68
+ readonly reason: "quota_exhausted";
69
+ readonly code: JsonRpcErrorCode.RateLimited;
70
+ readonly when: "GeoNames reported the account's hourly, daily, or weekly credit limit spent, or this server's pacer for the account shed the call.";
71
+ readonly recovery: "Wait for the window named in the message before calling again, or call again with a different GeoNames account: pass geonamesUsername, or omit it to use the server's.";
72
+ readonly retryable: true;
73
+ readonly thrownBy: "service";
74
+ }, {
75
+ readonly reason: "upstream_rejected_parameter";
76
+ readonly code: JsonRpcErrorCode.ValidationError;
77
+ readonly when: "GeoNames rejected a value the schema let through; the message carries its text.";
78
+ readonly recovery: "Correct the value named in the message and call again; geonames_list_reference lists valid feature classes, feature codes, and postal coverage.";
79
+ readonly severity: "notice";
80
+ readonly thrownBy: "service";
81
+ }], {
82
+ readonly totalCount: z.ZodNumber;
83
+ readonly truncated: z.ZodBoolean;
84
+ readonly shown: z.ZodNumber;
85
+ readonly cap: z.ZodNumber;
86
+ readonly notice: z.ZodOptional<z.ZodString>;
87
+ }>;
88
+ //# sourceMappingURL=get-children.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-children.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-children.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAkCjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmR1B,CAAC"}
@@ -0,0 +1,248 @@
1
+ /**
2
+ * @fileoverview geonames_get_children — the direct children of a GeoNames feature in the
3
+ * administrative, tourism, geography, or dependency tree (`childrenJSON`, 1 credit,
4
+ * cached a day). The whole list is fetched once, so paging and name filtering are local.
5
+ * @module mcp-server/tools/definitions/get-children.tool
6
+ */
7
+ import { tool, z } from '@cyanheads/mcp-ts-core';
8
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
+ import { blankAsUnset, geonameIdInput, geonamesUsernameInput, limitInput, lowerCased, nameContainsInput, nameMatcher, offsetInput, paginate, USERNAME_ALIASES, } from '../shared-inputs.js';
10
+ import { getGeoNamesService } from '../../../services/geonames/geonames-service.js';
11
+ import { inlineText, tableCell } from '../../../utils/inline-text.js';
12
+ const HIERARCHIES = ['administrative', 'tourism', 'geography', 'dependency'];
13
+ /** The most rows `childrenJSON` is asked for per parent. */
14
+ const FETCH_CAP = 1000;
15
+ /** A child row as this tool returns it: the gazetteer fields minus the country label, id, and distance. */
16
+ const toChild = ({ countryGeonameId: _countryId, countryName: _countryName, distanceInKm: _distance, featureClassName: _className, ...child }) => child;
17
+ const orNotAvailable = (value) => value === undefined ? 'Not available' : tableCell(value);
18
+ export const getChildrenTool = tool('geonames_get_children', {
19
+ title: 'List GeoNames children',
20
+ description: "List the direct children of a GeoNames feature — a continent's countries, a country's first-level divisions, a state's counties, a city's sections — in the administrative tree, or in the tourism, geography, or dependency tree. Start from a country's geonameId (geonames_get_countries) or any admin division's. Only admin divisions and populated places appear; use geonames_search_places with a boundingBox for other feature types. The full child list is fetched once (1 GeoNames credit) and cached, so paging and nameContains filtering are free.",
21
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
22
+ input: z.object({
23
+ geonameId: geonameIdInput.describe('GeoNames id of the parent feature, a positive integer up to 2147483647 such as 6252001 (United States), as returned in geonameId by the other geonames tools. A geonames.org/<id> URL is reduced to its id.'),
24
+ hierarchy: blankAsUnset(lowerCased(z.enum(HIERARCHIES).default('administrative'))).describe('Which tree to descend: administrative (the default: countries, admin divisions, populated places), tourism (tourist regions and islands), geography (physical regions), or dependency (dependent territories). Case-insensitive.'),
25
+ nameContains: nameContainsInput.describe('Keep only children whose name or toponym name contains every word of this text as a substring (kansas also matches Arkansas), ignoring case, accents, and punctuation.'),
26
+ limit: limitInput(500, 100),
27
+ offset: offsetInput(),
28
+ geonamesUsername: geonamesUsernameInput,
29
+ }),
30
+ inputAliases: USERNAME_ALIASES,
31
+ output: z.object({
32
+ found: z.boolean().describe('False when GeoNames has no feature with this geonameId.'),
33
+ parentGeonameId: z.number().describe('The geonameId whose children were requested.'),
34
+ hierarchy: z.enum(HIERARCHIES).describe('The tree that was descended.'),
35
+ guidance: z.string().optional().describe('What to do next; present only when found is false.'),
36
+ children: z
37
+ .array(z
38
+ .object({
39
+ geonameId: z
40
+ .number()
41
+ .describe('GeoNames feature id of the child: pass it to geonames_get_children again to descend further, or to geonames_get_place.'),
42
+ name: z.string().describe('Name of the child, as GeoNames displays it.'),
43
+ toponymName: z
44
+ .string()
45
+ .describe("GeoNames' main name for the feature, often the local-language form."),
46
+ featureClass: z
47
+ .string()
48
+ .optional()
49
+ .describe('One-letter feature class (A admin division, P populated place, …).'),
50
+ featureCode: z
51
+ .string()
52
+ .optional()
53
+ .describe('Feature code, such as ADM1 (first-order division) or PPLX (section).'),
54
+ featureName: z.string().optional().describe("GeoNames' name for the feature code."),
55
+ countryCode: z
56
+ .string()
57
+ .optional()
58
+ .describe('ISO 3166-1 alpha-2 code of the containing country.'),
59
+ adminCode1: z
60
+ .string()
61
+ .optional()
62
+ .describe('Code of the first-order admin division containing it.'),
63
+ adminName1: z
64
+ .string()
65
+ .optional()
66
+ .describe('Name of the first-order admin division containing it.'),
67
+ iso3166_2: z
68
+ .string()
69
+ .optional()
70
+ .describe('ISO 3166-2 code of the first-order admin division, subdivision part only: MO, not US-MO.'),
71
+ lat: z
72
+ .number()
73
+ .optional()
74
+ .describe('Latitude in decimal degrees. Absent when GeoNames sent none.'),
75
+ lng: z
76
+ .number()
77
+ .optional()
78
+ .describe('Longitude in decimal degrees. Absent when GeoNames sent none.'),
79
+ population: z
80
+ .number()
81
+ .optional()
82
+ .describe('Population. Absent when GeoNames records none.'),
83
+ })
84
+ .describe('One child feature.'))
85
+ .describe("Children on this page, in GeoNames' order; empty when found is false or the feature has none."),
86
+ nextOffset: z.number().optional().describe('Offset of the next page; absent on the last page.'),
87
+ }),
88
+ enrichment: {
89
+ totalCount: z.number().describe('Children matching nameContains, before paging.'),
90
+ truncated: z.boolean().describe('True when more children remain past this page.'),
91
+ shown: z.number().describe('Children returned on this page.'),
92
+ cap: z.number().describe('The limit that was applied.'),
93
+ notice: z
94
+ .string()
95
+ .optional()
96
+ .describe('Guidance when there are no children, nothing matched, the offset is past the end, more pages remain, or GeoNames holds more children than it returns.'),
97
+ },
98
+ errors: [
99
+ {
100
+ reason: 'username_required',
101
+ code: JsonRpcErrorCode.Unauthorized,
102
+ when: "Neither geonamesUsername nor the server's GEONAMES_USERNAME supplies a GeoNames account.",
103
+ recovery: 'Call the tool again with geonamesUsername set to a free GeoNames account that has web services enabled, or ask the operator to set GEONAMES_USERNAME.',
104
+ severity: 'notice',
105
+ thrownBy: 'service',
106
+ },
107
+ {
108
+ reason: 'caller_account_rejected',
109
+ code: JsonRpcErrorCode.Unauthorized,
110
+ when: 'GeoNames rejected the caller-supplied geonamesUsername (unknown user, or free web services not enabled).',
111
+ recovery: "Enable free web services for that account on its GeoNames account page, or call the tool again without geonamesUsername to use the server's account.",
112
+ severity: 'notice',
113
+ thrownBy: 'service',
114
+ },
115
+ {
116
+ reason: 'server_account_rejected',
117
+ code: JsonRpcErrorCode.ConfigurationError,
118
+ when: "GeoNames rejected the server's GEONAMES_USERNAME.",
119
+ recovery: 'The operator must set GEONAMES_USERNAME to a registered account with free web services enabled; until then call the tool again with geonamesUsername set to your own account.',
120
+ thrownBy: 'service',
121
+ },
122
+ {
123
+ reason: 'quota_exhausted',
124
+ code: JsonRpcErrorCode.RateLimited,
125
+ when: "GeoNames reported the account's hourly, daily, or weekly credit limit spent, or this server's pacer for the account shed the call.",
126
+ recovery: "Wait for the window named in the message before calling again, or call again with a different GeoNames account: pass geonamesUsername, or omit it to use the server's.",
127
+ retryable: true,
128
+ thrownBy: 'service',
129
+ },
130
+ {
131
+ reason: 'upstream_rejected_parameter',
132
+ code: JsonRpcErrorCode.ValidationError,
133
+ when: 'GeoNames rejected a value the schema let through; the message carries its text.',
134
+ recovery: 'Correct the value named in the message and call again; geonames_list_reference lists valid feature classes, feature codes, and postal coverage.',
135
+ severity: 'notice',
136
+ thrownBy: 'service',
137
+ },
138
+ ],
139
+ async handler(input, ctx) {
140
+ ctx.enrich.total(0);
141
+ ctx.enrich({ truncated: false, shown: 0, cap: input.limit });
142
+ const { hierarchy } = input;
143
+ const parentGeonameId = Number(input.geonameId);
144
+ const service = getGeoNamesService();
145
+ const result = await service.children(input.geonameId, hierarchy, service.resolveAccount(input.geonamesUsername), ctx);
146
+ if (result === undefined) {
147
+ return {
148
+ found: false,
149
+ parentGeonameId,
150
+ hierarchy,
151
+ guidance: `No GeoNames feature has geonameId ${input.geonameId}. Find it with geonames_search_places or geonames_get_countries.`,
152
+ children: [],
153
+ };
154
+ }
155
+ const all = result.children;
156
+ const matcher = input.nameContains === undefined ? undefined : nameMatcher(input.nameContains);
157
+ const matches = matcher ? all.filter((child) => matcher([child.name, child.toponymName])) : all;
158
+ const { page, nextOffset } = paginate(matches, input.offset, input.limit);
159
+ ctx.enrich.total(matches.length);
160
+ ctx.enrich({ shown: page.length });
161
+ const fragments = [];
162
+ if (all.length === 0) {
163
+ fragments.push(hierarchy === 'administrative'
164
+ ? 'This feature has no children in the administrative tree. Try hierarchy tourism, geography, or dependency, or search inside it with geonames_search_places and a boundingBox.'
165
+ : `This feature has no children in the ${hierarchy} tree; call again with hierarchy administrative.`);
166
+ }
167
+ else if (matches.length === 0 && input.nameContains !== undefined) {
168
+ fragments.push(`No child name contains "${inlineText(input.nameContains)}" among ${all.length}; call again without nameContains to browse them all.`);
169
+ }
170
+ else if (page.length === 0) {
171
+ fragments.push(`offset ${input.offset} is past the last child (${matches.length}); call again with a smaller offset.`);
172
+ }
173
+ if (nextOffset !== undefined) {
174
+ const remaining = matches.length - nextOffset;
175
+ ctx.enrich.truncated({ shown: page.length, cap: input.limit });
176
+ fragments.push(`${remaining} more ${remaining === 1 ? 'child' : 'children'}; call again with offset ${nextOffset}.`);
177
+ }
178
+ if (result.totalCount > all.length) {
179
+ fragments.push(`GeoNames lists ${result.totalCount.toLocaleString('en-US')} children but returns at most ${FETCH_CAP.toLocaleString('en-US')} per parent; narrow with geonames_search_places using featureCodes and a boundingBox.`);
180
+ }
181
+ if (fragments.length > 0)
182
+ ctx.enrich.notice(fragments.join(' '));
183
+ return {
184
+ found: true,
185
+ parentGeonameId,
186
+ hierarchy,
187
+ children: page.map(toChild),
188
+ ...(nextOffset === undefined ? {} : { nextOffset }),
189
+ };
190
+ },
191
+ format: (result) => {
192
+ const lines = [
193
+ `## GeoNames children of geonameId ${result.parentGeonameId} (${result.hierarchy} tree)`,
194
+ '',
195
+ `**Found:** ${result.found}`,
196
+ ];
197
+ if (result.guidance !== undefined)
198
+ lines.push('', inlineText(result.guidance));
199
+ if (result.found && result.children.length === 0) {
200
+ lines.push('', 'No children on this page.');
201
+ }
202
+ if (result.children.length > 0) {
203
+ lines.push('', '| geonameId | Name | Feature | Country | First-level division | Population | Lat, Lng |', '|:---|:---|:---|:---|:---|:---|:---|');
204
+ for (const child of result.children) {
205
+ const name = child.toponymName === child.name
206
+ ? tableCell(child.name)
207
+ : `${tableCell(child.name)} (toponym: ${tableCell(child.toponymName)})`;
208
+ const feature = child.featureCode === undefined && child.featureClass === undefined
209
+ ? 'Not available'
210
+ : [
211
+ child.featureCode && tableCell(child.featureCode),
212
+ child.featureName && tableCell(child.featureName),
213
+ child.featureClass && `(class ${tableCell(child.featureClass)})`,
214
+ ]
215
+ .filter(Boolean)
216
+ .join(' ');
217
+ const admin1 = child.adminName1 === undefined &&
218
+ child.adminCode1 === undefined &&
219
+ child.iso3166_2 === undefined
220
+ ? 'Not available'
221
+ : [
222
+ child.adminName1 && tableCell(child.adminName1),
223
+ child.adminCode1 && `(code ${tableCell(child.adminCode1)})`,
224
+ child.iso3166_2 && `ISO ${tableCell(child.iso3166_2)}`,
225
+ ]
226
+ .filter(Boolean)
227
+ .join(' ');
228
+ lines.push(`| ${[
229
+ child.geonameId,
230
+ name,
231
+ feature,
232
+ orNotAvailable(child.countryCode),
233
+ admin1,
234
+ child.population === undefined
235
+ ? 'Not available'
236
+ : child.population.toLocaleString('en-US'),
237
+ child.lat === undefined || child.lng === undefined
238
+ ? 'Not available'
239
+ : `${child.lat}, ${child.lng}`,
240
+ ].join(' | ')} |`);
241
+ }
242
+ }
243
+ if (result.nextOffset !== undefined)
244
+ lines.push('', `Next page: offset ${result.nextOffset}.`);
245
+ return [{ type: 'text', text: lines.join('\n') }];
246
+ },
247
+ });
248
+ //# sourceMappingURL=get-children.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-children.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-children.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,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,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,EAAE;iBACjC,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"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * @fileoverview geonames_get_countries — GeoNames country facts. The full country table
3
+ * is fetched once a day (1 credit) and cached; codes, continent, and name filter it
4
+ * locally.
5
+ * @module mcp-server/tools/definitions/get-countries.tool
6
+ */
7
+ import { z } from '@cyanheads/mcp-ts-core';
8
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
+ export declare const getCountriesTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
10
+ countries: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>, unknown>;
11
+ continent: z.ZodPreprocess<z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
12
+ AF: "AF";
13
+ AN: "AN";
14
+ AS: "AS";
15
+ EU: "EU";
16
+ NA: "NA";
17
+ OC: "OC";
18
+ SA: "SA";
19
+ }>>, unknown>, unknown>;
20
+ nameContains: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
21
+ limit: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
22
+ offset: z.ZodPreprocess<z.ZodDefault<z.ZodNumber>, unknown>;
23
+ geonamesUsername: z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ countries: z.ZodArray<z.ZodObject<{
26
+ countryCode: z.ZodString;
27
+ isoAlpha3: z.ZodString;
28
+ isoNumeric: z.ZodOptional<z.ZodString>;
29
+ fipsCode: z.ZodOptional<z.ZodString>;
30
+ countryName: z.ZodString;
31
+ geonameId: z.ZodNumber;
32
+ capital: z.ZodOptional<z.ZodString>;
33
+ continentCode: z.ZodString;
34
+ continentName: z.ZodString;
35
+ population: z.ZodOptional<z.ZodNumber>;
36
+ areaInSqKm: z.ZodOptional<z.ZodNumber>;
37
+ languages: z.ZodArray<z.ZodString>;
38
+ currencyCode: z.ZodOptional<z.ZodString>;
39
+ postalCodeFormat: z.ZodOptional<z.ZodString>;
40
+ boundingBox: z.ZodObject<{
41
+ north: z.ZodNumber;
42
+ south: z.ZodNumber;
43
+ east: z.ZodNumber;
44
+ west: z.ZodNumber;
45
+ }, z.core.$strip>;
46
+ }, z.core.$strip>>;
47
+ notFound: z.ZodArray<z.ZodString>;
48
+ nextOffset: z.ZodOptional<z.ZodNumber>;
49
+ }, z.core.$strip>, readonly [{
50
+ readonly reason: "username_required";
51
+ readonly code: JsonRpcErrorCode.Unauthorized;
52
+ readonly when: "Neither geonamesUsername nor the server's GEONAMES_USERNAME supplies a GeoNames account.";
53
+ readonly recovery: "Call the tool again with geonamesUsername set to a free GeoNames account that has web services enabled, or ask the operator to set GEONAMES_USERNAME.";
54
+ readonly severity: "notice";
55
+ readonly thrownBy: "service";
56
+ }, {
57
+ readonly reason: "caller_account_rejected";
58
+ readonly code: JsonRpcErrorCode.Unauthorized;
59
+ readonly when: "GeoNames rejected the caller-supplied geonamesUsername (unknown user, or free web services not enabled).";
60
+ readonly recovery: "Enable free web services for that account on its GeoNames account page, or call the tool again without geonamesUsername to use the server's account.";
61
+ readonly severity: "notice";
62
+ readonly thrownBy: "service";
63
+ }, {
64
+ readonly reason: "server_account_rejected";
65
+ readonly code: JsonRpcErrorCode.ConfigurationError;
66
+ readonly when: "GeoNames rejected the server's GEONAMES_USERNAME.";
67
+ readonly recovery: "The operator must set GEONAMES_USERNAME to a registered account with free web services enabled; until then call the tool again with geonamesUsername set to your own account.";
68
+ readonly thrownBy: "service";
69
+ }, {
70
+ readonly reason: "quota_exhausted";
71
+ readonly code: JsonRpcErrorCode.RateLimited;
72
+ readonly when: "GeoNames reported the account's hourly, daily, or weekly credit limit spent, or this server's pacer for the account shed the call.";
73
+ readonly recovery: "Wait for the window named in the message before calling again, or call again with a different GeoNames account: pass geonamesUsername, or omit it to use the server's.";
74
+ readonly retryable: true;
75
+ readonly thrownBy: "service";
76
+ }, {
77
+ readonly reason: "upstream_rejected_parameter";
78
+ readonly code: JsonRpcErrorCode.ValidationError;
79
+ readonly when: "GeoNames rejected a value the schema let through; the message carries its text.";
80
+ readonly recovery: "Correct the value named in the message and call again; geonames_list_reference lists valid feature classes, feature codes, and postal coverage.";
81
+ readonly severity: "notice";
82
+ readonly thrownBy: "service";
83
+ }], {
84
+ readonly totalCount: z.ZodNumber;
85
+ readonly truncated: z.ZodBoolean;
86
+ readonly shown: z.ZodNumber;
87
+ readonly cap: z.ZodNumber;
88
+ readonly notice: z.ZodOptional<z.ZodString>;
89
+ }>;
90
+ //# sourceMappingURL=get-countries.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-countries.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-countries.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA4BjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6O3B,CAAC"}