@mapbox/mcp-server 0.8.1-dev.1 → 0.8.1-dev.3

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 (45) hide show
  1. package/dist/commonjs/tools/BaseTool.d.ts.map +1 -1
  2. package/dist/commonjs/tools/BaseTool.js +3 -1
  3. package/dist/commonjs/tools/BaseTool.js.map +1 -1
  4. package/dist/commonjs/tools/category-search-tool/CategorySearchTool.input.schema.d.ts +1 -1
  5. package/dist/commonjs/tools/category-search-tool/CategorySearchTool.output.schema.d.ts +212 -212
  6. package/dist/commonjs/tools/directions-tool/DirectionsTool.output.schema.d.ts +126 -126
  7. package/dist/commonjs/tools/reverse-geocode-tool/ReverseGeocodeTool.input.schema.d.ts +1 -1
  8. package/dist/commonjs/tools/reverse-geocode-tool/ReverseGeocodeTool.output.schema.d.ts +518 -518
  9. package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.input.schema.d.ts +13 -13
  10. package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.d.ts +377 -110
  11. package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.d.ts.map +1 -1
  12. package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.js +13 -0
  13. package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.js.map +1 -1
  14. package/dist/commonjs/tools/static-map-image-tool/StaticMapImageTool.input.schema.d.ts +8 -8
  15. package/dist/commonjs/tools/validateOutput.d.ts +12 -0
  16. package/dist/commonjs/tools/validateOutput.d.ts.map +1 -0
  17. package/dist/commonjs/tools/validateOutput.js +58 -0
  18. package/dist/commonjs/tools/validateOutput.js.map +1 -0
  19. package/dist/commonjs/tools/version-tool/VersionTool.output.schema.d.ts +2 -2
  20. package/dist/commonjs/version.json +4 -4
  21. package/dist/esm/tools/BaseTool.d.ts.map +1 -1
  22. package/dist/esm/tools/BaseTool.js +3 -1
  23. package/dist/esm/tools/BaseTool.js.map +1 -1
  24. package/dist/esm/tools/category-search-tool/CategorySearchTool.input.schema.d.ts +1 -1
  25. package/dist/esm/tools/category-search-tool/CategorySearchTool.output.schema.d.ts +212 -212
  26. package/dist/esm/tools/directions-tool/DirectionsTool.output.schema.d.ts +182 -182
  27. package/dist/esm/tools/isochrone-tool/IsochroneTool.output.schema.d.ts +12 -12
  28. package/dist/esm/tools/matrix-tool/MatrixTool.input.schema.d.ts +2 -2
  29. package/dist/esm/tools/reverse-geocode-tool/ReverseGeocodeTool.input.schema.d.ts +1 -1
  30. package/dist/esm/tools/reverse-geocode-tool/ReverseGeocodeTool.output.schema.d.ts +518 -518
  31. package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.input.schema.d.ts +13 -13
  32. package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.d.ts +401 -134
  33. package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.d.ts.map +1 -1
  34. package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.js +13 -0
  35. package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.js.map +1 -1
  36. package/dist/esm/tools/static-map-image-tool/StaticMapImageTool.input.schema.d.ts +8 -8
  37. package/dist/esm/tools/validateOutput.d.ts +12 -0
  38. package/dist/esm/tools/validateOutput.d.ts.map +1 -0
  39. package/dist/esm/tools/validateOutput.js +55 -0
  40. package/dist/esm/tools/validateOutput.js.map +1 -0
  41. package/dist/esm/tools/version-tool/VersionTool.output.schema.d.ts +2 -2
  42. package/dist/esm/version.json +4 -4
  43. package/package.json +3 -3
  44. package/patches/@modelcontextprotocol+sdk+1.25.1.patch +66 -0
  45. package/patches/@modelcontextprotocol+sdk+1.21.1.patch +0 -54
@@ -1 +1 @@
1
- {"version":3,"file":"SearchAndGeocodeTool.output.schema.d.ts","sourceRoot":"","sources":["../../../../src/tools/search-and-geocode-tool/SearchAndGe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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
1
+ {"version":3,"file":"SearchAndGeocodeTool.output.schema.d.ts","sourceRoot":"","sources":["../../../../src/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,QAAA,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
@@ -91,6 +91,19 @@ const SearchBoxFeaturePropertiesSchema = z
91
91
  brand: z.array(z.string()).optional(),
92
92
  brand_id: z.union([z.string(), z.array(z.string())]).optional(),
93
93
  external_ids: z.record(z.string()).optional(),
94
+ // Metadata schema for additional feature information
95
+ metadata: z
96
+ .object({
97
+ // API sometimes returns string, sometimes array - accept both
98
+ primary_photo: z.union([z.string(), z.array(z.string())]).optional(),
99
+ reading: z
100
+ .object({
101
+ ja_kana: z.string().optional(),
102
+ ja_latin: z.string().optional()
103
+ })
104
+ .optional()
105
+ })
106
+ .optional(),
94
107
  // Additional metadata
95
108
  maki: z.string().optional(),
96
109
  operational_status: z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"SearchAndGeocodeTool.output.schema.js","sourceRoot":"","sources":["../../../../src/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,kCAAkC;AAElC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2CAA2C;AAC3C,MAAM,gCAAgC,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,uBAAuB;IACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAErC,qBAAqB;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAElC,uBAAuB;IACvB,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,OAAO,EAAE,CAAC;aACP,MAAM,CAAC;YACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC3B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACnC,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC5C,CAAC;aACD,QAAQ,EAAE;QACb,MAAM,EAAE,CAAC;aACN,MAAM,CAAC;YACN,IAAI,EAAE,CA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AC,QAAQ,EAAE;IAEzC,mCAAmC;IACnC,GAAG,EAAE,CAAC;SACH,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC;SACD,QAAQ,EAAE;IAEb,2DAA2D;IAC3D,mEAAmE;IACnE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC;KACD,WAAW,EAAE,CAAC,CAAC,4DAA4D;AAE9E,0BAA0B;AAC1B,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACxB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;CAC3C,CAAC,CAAC;AAEH,gCAAgC;AAChC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,cAAc;IACxB,UAAU,EAAE,gCAAgC;CAC7C,CAAC,CAAC;AAEH,sCAAsC;AACtC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC"}
1
+ {"version":3,"file":"SearchAndGeocodeTool.output.schema.js","sourceRoot":"","sources":["../../../../src/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,kCAAkC;AAEl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AAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC"}
@@ -28,14 +28,14 @@ export declare const CustomMarkerOverlaySchema: z.ZodObject<{
28
28
  url: z.ZodString;
29
29
  }, "strip", z.ZodTypeAny, {
30
30
  type: "custom-marker";
31
+ url: string;
31
32
  longitude: number;
32
33
  latitude: number;
33
- url: string;
34
34
  }, {
35
35
  type: "custom-marker";
36
+ url: string;
36
37
  longitude: number;
37
38
  latitude: number;
38
- url: string;
39
39
  }>;
40
40
  export declare const PathOverlaySchema: z.ZodObject<{
41
41
  type: z.ZodLiteral<"path">;
@@ -100,14 +100,14 @@ export declare const OverlaySchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject
100
100
  url: z.ZodString;
101
101
  }, "strip", z.ZodTypeAny, {
102
102
  type: "custom-marker";
103
+ url: string;
103
104
  longitude: number;
104
105
  latitude: number;
105
- url: string;
106
106
  }, {
107
107
  type: "custom-marker";
108
+ url: string;
108
109
  longitude: number;
109
110
  latitude: number;
110
- url: string;
111
111
  }>, z.ZodObject<{
112
112
  type: z.ZodLiteral<"path">;
113
113
  encodedPolyline: z.ZodString;
@@ -194,14 +194,14 @@ export declare const StaticMapImageInputSchema: z.ZodObject<{
194
194
  url: z.ZodString;
195
195
  }, "strip", z.ZodTypeAny, {
196
196
  type: "custom-marker";
197
+ url: string;
197
198
  longitude: number;
198
199
  latitude: number;
199
- url: string;
200
200
  }, {
201
201
  type: "custom-marker";
202
+ url: string;
202
203
  longitude: number;
203
204
  latitude: number;
204
- url: string;
205
205
  }>, z.ZodObject<{
206
206
  type: z.ZodLiteral<"path">;
207
207
  encodedPolyline: z.ZodString;
@@ -257,9 +257,9 @@ export declare const StaticMapImageInputSchema: z.ZodObject<{
257
257
  label?: string | undefined;
258
258
  } | {
259
259
  type: "custom-marker";
260
+ url: string;
260
261
  longitude: number;
261
262
  latitude: number;
262
- url: string;
263
263
  } | {
264
264
  type: "path";
265
265
  encodedPolyline: string;
@@ -293,9 +293,9 @@ export declare const StaticMapImageInputSchema: z.ZodObject<{
293
293
  label?: string | undefined;
294
294
  } | {
295
295
  type: "custom-marker";
296
+ url: string;
296
297
  longitude: number;
297
298
  latitude: number;
298
- url: string;
299
299
  } | {
300
300
  type: "path";
301
301
  encodedPolyline: string;
@@ -0,0 +1,12 @@
1
+ import type { ZodTypeAny } from 'zod';
2
+ import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
3
+ /**
4
+ * Validates the structured content against the output schema.
5
+ * If validation fails, returns a safe fallback response that includes
6
+ * the raw data as JSON text but omits the structuredContent field.
7
+ *
8
+ * This prevents MCP protocol-level validation errors when the API
9
+ * returns data that doesn't match the expected schema.
10
+ */
11
+ export declare function validateAndSanitizeOutput<OutputSchema extends ZodTypeAny>(result: CallToolResult, outputSchema?: OutputSchema, toolName?: string): CallToolResult;
12
+ //# sourceMappingURL=validateOutput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateOutput.d.ts","sourceRoot":"","sources":["../../../src/tools/validateOutput.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,SAAS,UAAU,EACvE,MAAM,EAAE,cAAc,EACtB,YAAY,CAAC,EAAE,YAAY,EAC3B,QAAQ,CAAC,EAAE,MAAM,GAChB,cAAc,CAoDhB"}
@@ -0,0 +1,55 @@
1
+ // Copyright (c) Mapbox, Inc.
2
+ // Licensed under the MIT License.
3
+ /**
4
+ * Validates the structured content against the output schema.
5
+ * If validation fails, returns a safe fallback response that includes
6
+ * the raw data as JSON text but omits the structuredContent field.
7
+ *
8
+ * This prevents MCP protocol-level validation errors when the API
9
+ * returns data that doesn't match the expected schema.
10
+ */
11
+ export function validateAndSanitizeOutput(result, outputSchema, toolName) {
12
+ // If no output schema is defined, return as-is
13
+ if (!outputSchema) {
14
+ return result;
15
+ }
16
+ // If the result is an error or has no structuredContent, return as-is
17
+ if (result.isError || !result.structuredContent) {
18
+ return result;
19
+ }
20
+ try {
21
+ // Try to parse the structured content with the schema
22
+ const parsed = outputSchema.parse(result.structuredContent);
23
+ // If successful, return the result with validated structured content
24
+ return {
25
+ ...result,
26
+ structuredContent: parsed
27
+ };
28
+ }
29
+ catch (validationError) {
30
+ // Validation failed - return a safe response without structuredContent
31
+ // The MCP framework won't validate if structuredContent is undefined
32
+ const errorMessage = validationError instanceof Error
33
+ ? validationError.message
34
+ : 'Unknown validation error';
35
+ console.warn(`Output validation failed for tool ${toolName || 'unknown'}: ${errorMessage}`);
36
+ // Create a text representation of the data
37
+ const jsonText = JSON.stringify(result.structuredContent, null, 2);
38
+ // Return without structuredContent to avoid MCP validation
39
+ // But include the data as formatted text
40
+ return {
41
+ content: [
42
+ {
43
+ type: 'text',
44
+ text: result.content?.[0]?.type === 'text'
45
+ ? result.content[0].text
46
+ : jsonText
47
+ }
48
+ ],
49
+ // Omit structuredContent to prevent MCP validation errors
50
+ // The data is still available in the text content
51
+ isError: false
52
+ };
53
+ }
54
+ }
55
+ //# sourceMappingURL=validateOutput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateOutput.js","sourceRoot":"","sources":["../../../src/tools/validateOutput.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,kCAAkC;AAKlC;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAAsB,EACtB,YAA2B,EAC3B,QAAiB;IAEjB,+CAA+C;IAC/C,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,sEAAsE;IACtE,IAAI,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAChD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,CAAC;QACH,sDAAsD;QACtD,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAE5D,qEAAqE;QACrE,OAAO;YACL,GAAG,MAAM;YACT,iBAAiB,EAAE,MAAM;SAC1B,CAAC;IACJ,CAAC;IAAC,OAAO,eAAe,EAAE,CAAC;QACzB,uEAAuE;QACvE,qEAAqE;QACrE,MAAM,YAAY,GAChB,eAAe,YAAY,KAAK;YAC9B,CAAC,CAAC,eAAe,CAAC,OAAO;YACzB,CAAC,CAAC,0BAA0B,CAAC;QAEjC,OAAO,CAAC,IAAI,CACV,qCAAqC,QAAQ,IAAI,SAAS,KAAK,YAAY,EAAE,CAC9E,CAAC;QAEF,2CAA2C;QAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAEnE,2DAA2D;QAC3D,yCAAyC;QACzC,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EACF,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,MAAM;wBAClC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;wBACxB,CAAC,CAAC,QAAQ;iBACf;aACF;YACD,0DAA0D;YAC1D,kDAAkD;YAClD,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -6,14 +6,14 @@ export declare const VersionResponseSchema: z.ZodObject<{
6
6
  tag: z.ZodString;
7
7
  branch: z.ZodString;
8
8
  }, "strip", z.ZodTypeAny, {
9
- name: string;
10
9
  version: string;
10
+ name: string;
11
11
  sha: string;
12
12
  tag: string;
13
13
  branch: string;
14
14
  }, {
15
- name: string;
16
15
  version: string;
16
+ name: string;
17
17
  sha: string;
18
18
  tag: string;
19
19
  branch: string;
@@ -1,6 +1,6 @@
1
1
  {
2
- "sha": "c01baeebfe04c7154325eee7adc5efe24247c3c2",
3
- "tag": "v0.6.1-18-gc01baee",
4
- "branch": "update_search_and_geocode_tool_schema",
5
- "version": "0.8.0"
2
+ "sha": "badd59c9eb14b127847781422d15ca6288a8842d",
3
+ "tag": "v0.8.1-dev.2-1-gbadd59c",
4
+ "branch": "valentin_temp",
5
+ "version": "0.8.1-dev.2"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapbox/mcp-server",
3
- "version": "0.8.1-dev.1",
3
+ "version": "0.8.1-dev.3",
4
4
  "description": "Mapbox MCP server.",
5
5
  "mcpName": "io.github.mapbox/mcp-server",
6
6
  "main": "./dist/commonjs/index.js",
@@ -19,7 +19,7 @@
19
19
  "lint": "eslint \"./src/**/*.{ts,tsx}\" \"./test/**/*.{ts,tsx}\"",
20
20
  "lint:fix": "eslint \"./src/**/*.{ts,tsx}\" \"./test/**/*.{ts,tsx}\" --fix",
21
21
  "postinstall": "patch-package",
22
- "prepare": "husky && node .husky/setup-hooks.js",
22
+ "prepare": "node -e \"try { require('fs').accessSync('.husky/setup-hooks.js'); require('child_process').execSync('husky && node .husky/setup-hooks.js', {stdio:'inherit'}) } catch { }\"",
23
23
  "spellcheck": "cspell \"*.md\" \"src/**/*.ts\" \"test/**/*.ts\"",
24
24
  "sync-manifest": "node scripts/sync-manifest-version.cjs",
25
25
  "test": "vitest",
@@ -76,7 +76,7 @@
76
76
  ],
77
77
  "dependencies": {
78
78
  "@mcp-ui/server": "^5.13.1",
79
- "@modelcontextprotocol/sdk": "^1.21.1",
79
+ "@modelcontextprotocol/sdk": "^1.25.1",
80
80
  "@opentelemetry/api": "^1.9.0",
81
81
  "@opentelemetry/auto-instrumentations-node": "^0.56.0",
82
82
  "@opentelemetry/exporter-trace-otlp-http": "^0.56.0",
@@ -0,0 +1,66 @@
1
+ diff --git a/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js b/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js
2
+ index e10bb3d..2e99bee 100644
3
+ --- a/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js
4
+ +++ b/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js
5
+ @@ -197,15 +197,20 @@ class McpServer {
6
+ return;
7
+ }
8
+ if (!result.structuredContent) {
9
+ - throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Output validation error: Tool ${toolName} has an output schema but no structured content was provided`);
10
+ + // Log warning but don't throw - allow tools to omit structured content
11
+ + console.warn(`[MCP SDK Patch] Output validation warning: Tool ${toolName} has an output schema but no structured content was provided`);
12
+ }
13
+ - // if the tool has an output schema, validate structured content
14
+ - const outputObj = (0, zod_compat_js_1.normalizeObjectSchema)(tool.outputSchema);
15
+ - const parseResult = await (0, zod_compat_js_1.safeParseAsync)(outputObj, result.structuredContent);
16
+ - if (!parseResult.success) {
17
+ - const error = 'error' in parseResult ? parseResult.error : 'Unknown error';
18
+ - const errorMessage = (0, zod_compat_js_1.getParseErrorMessage)(error);
19
+ - throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`);
20
+ + else {
21
+ + // if the tool has an output schema, validate structured content
22
+ + const outputObj = (0, zod_compat_js_1.normalizeObjectSchema)(tool.outputSchema);
23
+ + const parseResult = await (0, zod_compat_js_1.safeParseAsync)(outputObj, result.structuredContent);
24
+ + if (!parseResult.success) {
25
+ + const error = 'error' in parseResult ? parseResult.error : 'Unknown error';
26
+ + const errorMessage = (0, zod_compat_js_1.getParseErrorMessage)(error);
27
+ + // Log warning but don't throw - allow schema mismatches
28
+ + console.warn(`[MCP SDK Patch] Output validation warning: Invalid structured content for tool ${toolName}: ${errorMessage}`);
29
+ + // Keep the structuredContent despite validation failure
30
+ + }
31
+ }
32
+ }
33
+ /**
34
+ diff --git a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js b/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
35
+ index 23639ce..7b8a325 100644
36
+ --- a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
37
+ +++ b/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
38
+ @@ -194,15 +194,20 @@ export class McpServer {
39
+ return;
40
+ }
41
+ if (!result.structuredContent) {
42
+ - throw new McpError(ErrorCode.InvalidParams, `Output validation error: Tool ${toolName} has an output schema but no structured content was provided`);
43
+ + // Log warning but don't throw - allow tools to omit structured content
44
+ + console.warn(`[MCP SDK Patch] Output validation warning: Tool ${toolName} has an output schema but no structured content was provided`);
45
+ }
46
+ - // if the tool has an output schema, validate structured content
47
+ - const outputObj = normalizeObjectSchema(tool.outputSchema);
48
+ - const parseResult = await safeParseAsync(outputObj, result.structuredContent);
49
+ - if (!parseResult.success) {
50
+ - const error = 'error' in parseResult ? parseResult.error : 'Unknown error';
51
+ - const errorMessage = getParseErrorMessage(error);
52
+ - throw new McpError(ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`);
53
+ + else {
54
+ + // if the tool has an output schema, validate structured content
55
+ + const outputObj = normalizeObjectSchema(tool.outputSchema);
56
+ + const parseResult = await safeParseAsync(outputObj, result.structuredContent);
57
+ + if (!parseResult.success) {
58
+ + const error = 'error' in parseResult ? parseResult.error : 'Unknown error';
59
+ + const errorMessage = getParseErrorMessage(error);
60
+ + // Log warning but don't throw - allow schema mismatches
61
+ + console.warn(`[MCP SDK Patch] Output validation warning: Invalid structured content for tool ${toolName}: ${errorMessage}`);
62
+ + // Keep the structuredContent despite validation failure
63
+ + }
64
+ }
65
+ }
66
+ /**
@@ -1,54 +0,0 @@
1
- diff --git a/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js b/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js
2
- index 31819ff..ae95a35 100644
3
- --- a/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js
4
- +++ b/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js
5
- @@ -100,12 +100,16 @@ class McpServer {
6
- }
7
- if (tool.outputSchema && !result.isError) {
8
- if (!result.structuredContent) {
9
- - throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Output validation error: Tool ${request.params.name} has an output schema but no structured content was provided`);
10
- - }
11
- - // if the tool has an output schema, validate structured content
12
- - const parseResult = await tool.outputSchema.safeParseAsync(result.structuredContent);
13
- - if (!parseResult.success) {
14
- - throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${request.params.name}: ${parseResult.error.message}`);
15
- + // Log warning but don't throw - allow tools to omit structured content
16
- + console.warn(`[MCP SDK Patch] Output validation warning: Tool ${request.params.name} has an output schema but no structured content was provided`);
17
- + } else {
18
- + // if the tool has an output schema, validate structured content
19
- + const parseResult = await tool.outputSchema.safeParseAsync(result.structuredContent);
20
- + if (!parseResult.success) {
21
- + // Log warning but don't throw - allow schema mismatches
22
- + console.warn(`[MCP SDK Patch] Output validation warning: Invalid structured content for tool ${request.params.name}: ${parseResult.error.message}`);
23
- + // Keep the structuredContent despite validation failure
24
- + }
25
- }
26
- }
27
- }
28
- diff --git a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js b/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
29
- index d5aadc5..b527424 100644
30
- --- a/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
31
- +++ b/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
32
- @@ -97,12 +97,16 @@ export class McpServer {
33
- }
34
- if (tool.outputSchema && !result.isError) {
35
- if (!result.structuredContent) {
36
- - throw new McpError(ErrorCode.InvalidParams, `Output validation error: Tool ${request.params.name} has an output schema but no structured content was provided`);
37
- - }
38
- - // if the tool has an output schema, validate structured content
39
- - const parseResult = await tool.outputSchema.safeParseAsync(result.structuredContent);
40
- - if (!parseResult.success) {
41
- - throw new McpError(ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${request.params.name}: ${parseResult.error.message}`);
42
- + // Log warning but don't throw - allow tools to omit structured content
43
- + console.warn(`[MCP SDK Patch] Output validation warning: Tool ${request.params.name} has an output schema but no structured content was provided`);
44
- + } else {
45
- + // if the tool has an output schema, validate structured content
46
- + const parseResult = await tool.outputSchema.safeParseAsync(result.structuredContent);
47
- + if (!parseResult.success) {
48
- + // Log warning but don't throw - allow schema mismatches
49
- + console.warn(`[MCP SDK Patch] Output validation warning: Invalid structured content for tool ${request.params.name}: ${parseResult.error.message}`);
50
- + // Keep the structuredContent despite validation failure
51
- + }
52
- }
53
- }
54
- }