@mapbox/mcp-server 0.8.3 → 99.0.0-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -45
- package/dist/commonjs/index.js +19 -2
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/prompts/SearchAlongRoutePrompt.js +6 -6
- package/dist/commonjs/prompts/index.d.ts +41 -0
- package/dist/commonjs/prompts/index.d.ts.map +1 -0
- package/dist/commonjs/prompts/index.js +56 -0
- package/dist/commonjs/prompts/index.js.map +1 -0
- package/dist/commonjs/resources/BaseResource.d.ts +1 -1
- package/dist/commonjs/resources/BaseResource.d.ts.map +1 -1
- package/dist/commonjs/resources/BaseResource.js +12 -2
- package/dist/commonjs/resources/BaseResource.js.map +1 -1
- package/dist/commonjs/resources/index.d.ts +10 -0
- package/dist/commonjs/resources/index.d.ts.map +1 -0
- package/dist/commonjs/resources/index.js +48 -0
- package/dist/commonjs/resources/index.js.map +1 -0
- package/dist/commonjs/resources/resourceRegistry.d.ts +4 -1
- package/dist/commonjs/resources/resourceRegistry.d.ts.map +1 -1
- package/dist/commonjs/resources/resourceRegistry.js +7 -1
- package/dist/commonjs/resources/resourceRegistry.js.map +1 -1
- package/dist/commonjs/resources/temporary/TemporaryDataResource.d.ts +13 -0
- package/dist/commonjs/resources/temporary/TemporaryDataResource.d.ts.map +1 -0
- package/dist/commonjs/resources/temporary/TemporaryDataResource.js +41 -0
- package/dist/commonjs/resources/temporary/TemporaryDataResource.js.map +1 -0
- package/dist/commonjs/resources/ui-apps/StaticMapUIResource.d.ts +15 -0
- package/dist/commonjs/resources/ui-apps/StaticMapUIResource.d.ts.map +1 -0
- package/dist/commonjs/resources/ui-apps/StaticMapUIResource.js +262 -0
- package/dist/commonjs/resources/ui-apps/StaticMapUIResource.js.map +1 -0
- package/dist/commonjs/resources/version/VersionResource.d.ts +16 -0
- package/dist/commonjs/resources/version/VersionResource.d.ts.map +1 -0
- package/dist/commonjs/resources/version/VersionResource.js +33 -0
- package/dist/commonjs/resources/version/VersionResource.js.map +1 -0
- package/dist/commonjs/tools/BaseTool.d.ts +10 -0
- package/dist/commonjs/tools/BaseTool.d.ts.map +1 -1
- package/dist/commonjs/tools/BaseTool.js +9 -4
- package/dist/commonjs/tools/BaseTool.js.map +1 -1
- package/dist/commonjs/tools/category-search-tool/CategorySearchTool.d.ts.map +1 -1
- package/dist/commonjs/tools/category-search-tool/CategorySearchTool.input.schema.d.ts +2 -2
- package/dist/commonjs/tools/category-search-tool/CategorySearchTool.js +4 -0
- package/dist/commonjs/tools/category-search-tool/CategorySearchTool.js.map +1 -1
- package/dist/commonjs/tools/category-search-tool/CategorySearchTool.output.schema.d.ts +17846 -2030
- package/dist/commonjs/tools/category-search-tool/CategorySearchTool.output.schema.d.ts.map +1 -1
- package/dist/commonjs/tools/category-search-tool/CategorySearchTool.output.schema.js +73 -38
- package/dist/commonjs/tools/category-search-tool/CategorySearchTool.output.schema.js.map +1 -1
- package/dist/commonjs/tools/directions-tool/DirectionsTool.d.ts.map +1 -1
- package/dist/commonjs/tools/directions-tool/DirectionsTool.js +59 -2
- package/dist/commonjs/tools/directions-tool/DirectionsTool.js.map +1 -1
- package/dist/commonjs/tools/directions-tool/DirectionsTool.output.schema.d.ts +32 -32
- package/dist/commonjs/tools/index.d.ts +82 -0
- package/dist/commonjs/tools/index.d.ts.map +1 -0
- package/dist/commonjs/tools/index.js +142 -0
- package/dist/commonjs/tools/index.js.map +1 -0
- package/dist/commonjs/tools/isochrone-tool/IsochroneTool.d.ts.map +1 -1
- package/dist/commonjs/tools/isochrone-tool/IsochroneTool.js +21 -1
- package/dist/commonjs/tools/isochrone-tool/IsochroneTool.js.map +1 -1
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.d.ts +25 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.d.ts.map +1 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.input.schema.d.ts +25 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.input.schema.d.ts.map +1 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.input.schema.js +30 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.input.schema.js.map +1 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.js +193 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.js.map +1 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.output.schema.d.ts +296 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.output.schema.d.ts.map +1 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.output.schema.js +55 -0
- package/dist/commonjs/tools/place-details-tool/PlaceDetailsTool.output.schema.js.map +1 -0
- package/dist/commonjs/tools/reverse-geocode-tool/ReverseGeocodeTool.input.schema.d.ts +4 -4
- package/dist/commonjs/tools/reverse-geocode-tool/ReverseGeocodeTool.output.schema.d.ts +350 -350
- package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.d.ts.map +1 -1
- package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.input.schema.d.ts +4 -4
- package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.js +4 -0
- package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.js.map +1 -1
- package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.d.ts +186 -186
- package/dist/commonjs/tools/static-map-image-tool/StaticMapImageTool.d.ts +9 -0
- package/dist/commonjs/tools/static-map-image-tool/StaticMapImageTool.d.ts.map +1 -1
- package/dist/commonjs/tools/static-map-image-tool/StaticMapImageTool.input.schema.d.ts +12 -12
- package/dist/commonjs/tools/static-map-image-tool/StaticMapImageTool.js +19 -24
- package/dist/commonjs/tools/static-map-image-tool/StaticMapImageTool.js.map +1 -1
- package/dist/commonjs/tools/toolRegistry.d.ts +3 -3
- package/dist/commonjs/tools/toolRegistry.d.ts.map +1 -1
- package/dist/commonjs/tools/toolRegistry.js +2 -2
- package/dist/commonjs/tools/toolRegistry.js.map +1 -1
- package/dist/commonjs/utils/index.d.ts +35 -0
- package/dist/commonjs/utils/index.d.ts.map +1 -0
- package/dist/commonjs/utils/index.js +48 -0
- package/dist/commonjs/utils/index.js.map +1 -0
- package/dist/commonjs/utils/temporaryResourceManager.d.ts +51 -0
- package/dist/commonjs/utils/temporaryResourceManager.d.ts.map +1 -0
- package/dist/commonjs/utils/temporaryResourceManager.js +92 -0
- package/dist/commonjs/utils/temporaryResourceManager.js.map +1 -0
- package/dist/commonjs/version.json +4 -4
- package/dist/esm/index.js +19 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/prompts/SearchAlongRoutePrompt.js +6 -6
- package/dist/esm/prompts/index.d.ts +41 -0
- package/dist/esm/prompts/index.d.ts.map +1 -0
- package/dist/esm/prompts/index.js +47 -0
- package/dist/esm/prompts/index.js.map +1 -0
- package/dist/esm/resources/BaseResource.d.ts +1 -1
- package/dist/esm/resources/BaseResource.d.ts.map +1 -1
- package/dist/esm/resources/BaseResource.js +12 -2
- package/dist/esm/resources/BaseResource.js.map +1 -1
- package/dist/esm/resources/index.d.ts +10 -0
- package/dist/esm/resources/index.d.ts.map +1 -0
- package/dist/esm/resources/index.js +41 -0
- package/dist/esm/resources/index.js.map +1 -0
- package/dist/esm/resources/resourceRegistry.d.ts +4 -1
- package/dist/esm/resources/resourceRegistry.d.ts.map +1 -1
- package/dist/esm/resources/resourceRegistry.js +7 -1
- package/dist/esm/resources/resourceRegistry.js.map +1 -1
- package/dist/esm/resources/temporary/TemporaryDataResource.d.ts +13 -0
- package/dist/esm/resources/temporary/TemporaryDataResource.d.ts.map +1 -0
- package/dist/esm/resources/temporary/TemporaryDataResource.js +37 -0
- package/dist/esm/resources/temporary/TemporaryDataResource.js.map +1 -0
- package/dist/esm/resources/ui-apps/StaticMapUIResource.d.ts +15 -0
- package/dist/esm/resources/ui-apps/StaticMapUIResource.d.ts.map +1 -0
- package/dist/esm/resources/ui-apps/StaticMapUIResource.js +258 -0
- package/dist/esm/resources/ui-apps/StaticMapUIResource.js.map +1 -0
- package/dist/esm/resources/version/VersionResource.d.ts +16 -0
- package/dist/esm/resources/version/VersionResource.d.ts.map +1 -0
- package/dist/esm/resources/version/VersionResource.js +29 -0
- package/dist/esm/resources/version/VersionResource.js.map +1 -0
- package/dist/esm/tools/BaseTool.d.ts +10 -0
- package/dist/esm/tools/BaseTool.d.ts.map +1 -1
- package/dist/esm/tools/BaseTool.js +9 -4
- package/dist/esm/tools/BaseTool.js.map +1 -1
- package/dist/esm/tools/category-search-tool/CategorySearchTool.d.ts.map +1 -1
- package/dist/esm/tools/category-search-tool/CategorySearchTool.input.schema.d.ts +2 -2
- package/dist/esm/tools/category-search-tool/CategorySearchTool.js +4 -0
- package/dist/esm/tools/category-search-tool/CategorySearchTool.js.map +1 -1
- package/dist/esm/tools/category-search-tool/CategorySearchTool.output.schema.d.ts +17846 -2030
- package/dist/esm/tools/category-search-tool/CategorySearchTool.output.schema.d.ts.map +1 -1
- package/dist/esm/tools/category-search-tool/CategorySearchTool.output.schema.js +73 -38
- package/dist/esm/tools/category-search-tool/CategorySearchTool.output.schema.js.map +1 -1
- package/dist/esm/tools/directions-tool/DirectionsTool.d.ts.map +1 -1
- package/dist/esm/tools/directions-tool/DirectionsTool.js +59 -2
- package/dist/esm/tools/directions-tool/DirectionsTool.js.map +1 -1
- package/dist/esm/tools/directions-tool/DirectionsTool.output.schema.d.ts +32 -32
- package/dist/esm/tools/index.d.ts +82 -0
- package/dist/esm/tools/index.d.ts.map +1 -0
- package/dist/esm/tools/index.js +114 -0
- package/dist/esm/tools/index.js.map +1 -0
- package/dist/esm/tools/isochrone-tool/IsochroneTool.d.ts.map +1 -1
- package/dist/esm/tools/isochrone-tool/IsochroneTool.js +21 -1
- package/dist/esm/tools/isochrone-tool/IsochroneTool.js.map +1 -1
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.d.ts +25 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.d.ts.map +1 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.input.schema.d.ts +25 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.input.schema.d.ts.map +1 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.input.schema.js +24 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.input.schema.js.map +1 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.js +189 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.js.map +1 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.output.schema.d.ts +296 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.output.schema.d.ts.map +1 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.output.schema.js +52 -0
- package/dist/esm/tools/place-details-tool/PlaceDetailsTool.output.schema.js.map +1 -0
- package/dist/esm/tools/reverse-geocode-tool/ReverseGeocodeTool.input.schema.d.ts +4 -4
- package/dist/esm/tools/reverse-geocode-tool/ReverseGeocodeTool.output.schema.d.ts +350 -350
- package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.d.ts.map +1 -1
- package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.input.schema.d.ts +4 -4
- package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.js +4 -0
- package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.js.map +1 -1
- package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.output.schema.d.ts +186 -186
- package/dist/esm/tools/static-map-image-tool/StaticMapImageTool.d.ts +9 -0
- package/dist/esm/tools/static-map-image-tool/StaticMapImageTool.d.ts.map +1 -1
- package/dist/esm/tools/static-map-image-tool/StaticMapImageTool.input.schema.d.ts +12 -12
- package/dist/esm/tools/static-map-image-tool/StaticMapImageTool.js +19 -24
- package/dist/esm/tools/static-map-image-tool/StaticMapImageTool.js.map +1 -1
- package/dist/esm/tools/toolRegistry.d.ts +3 -3
- package/dist/esm/tools/toolRegistry.d.ts.map +1 -1
- package/dist/esm/tools/toolRegistry.js +2 -2
- package/dist/esm/tools/toolRegistry.js.map +1 -1
- package/dist/esm/utils/index.d.ts +35 -0
- package/dist/esm/utils/index.d.ts.map +1 -0
- package/dist/esm/utils/index.js +38 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/temporaryResourceManager.d.ts +51 -0
- package/dist/esm/utils/temporaryResourceManager.d.ts.map +1 -0
- package/dist/esm/utils/temporaryResourceManager.js +88 -0
- package/dist/esm/utils/temporaryResourceManager.js.map +1 -0
- package/dist/esm/version.json +4 -4
- package/package.json +55 -9
- package/patches/@modelcontextprotocol+sdk+1.27.1.patch +33 -0
- package/dist/commonjs/tools/version-tool/VersionTool.d.ts +0 -18
- package/dist/commonjs/tools/version-tool/VersionTool.d.ts.map +0 -1
- package/dist/commonjs/tools/version-tool/VersionTool.input.schema.d.ts +0 -3
- package/dist/commonjs/tools/version-tool/VersionTool.input.schema.d.ts.map +0 -1
- package/dist/commonjs/tools/version-tool/VersionTool.input.schema.js +0 -8
- package/dist/commonjs/tools/version-tool/VersionTool.input.schema.js.map +0 -1
- package/dist/commonjs/tools/version-tool/VersionTool.js +0 -68
- package/dist/commonjs/tools/version-tool/VersionTool.js.map +0 -1
- package/dist/commonjs/tools/version-tool/VersionTool.output.schema.d.ts +0 -22
- package/dist/commonjs/tools/version-tool/VersionTool.output.schema.d.ts.map +0 -1
- package/dist/commonjs/tools/version-tool/VersionTool.output.schema.js +0 -15
- package/dist/commonjs/tools/version-tool/VersionTool.output.schema.js.map +0 -1
- package/dist/esm/tools/version-tool/VersionTool.d.ts +0 -18
- package/dist/esm/tools/version-tool/VersionTool.d.ts.map +0 -1
- package/dist/esm/tools/version-tool/VersionTool.input.schema.d.ts +0 -3
- package/dist/esm/tools/version-tool/VersionTool.input.schema.d.ts.map +0 -1
- package/dist/esm/tools/version-tool/VersionTool.input.schema.js +0 -5
- package/dist/esm/tools/version-tool/VersionTool.input.schema.js.map +0 -1
- package/dist/esm/tools/version-tool/VersionTool.js +0 -64
- package/dist/esm/tools/version-tool/VersionTool.js.map +0 -1
- package/dist/esm/tools/version-tool/VersionTool.output.schema.d.ts +0 -22
- package/dist/esm/tools/version-tool/VersionTool.output.schema.d.ts.map +0 -1
- package/dist/esm/tools/version-tool/VersionTool.output.schema.js +0 -12
- package/dist/esm/tools/version-tool/VersionTool.output.schema.js.map +0 -1
- package/patches/@modelcontextprotocol+sdk+1.25.3.patch +0 -66
|
@@ -71,7 +71,6 @@ declare const WaypointSchema: z.ZodObject<{
|
|
|
71
71
|
}, "strip", z.ZodTypeAny, {
|
|
72
72
|
name: string;
|
|
73
73
|
location: [number, number];
|
|
74
|
-
distance?: number | undefined;
|
|
75
74
|
metadata?: {
|
|
76
75
|
type: "charging-station";
|
|
77
76
|
name: string;
|
|
@@ -90,6 +89,7 @@ declare const WaypointSchema: z.ZodObject<{
|
|
|
90
89
|
} | {
|
|
91
90
|
type: "regular";
|
|
92
91
|
} | null | undefined;
|
|
92
|
+
distance?: number | undefined;
|
|
93
93
|
time_zone?: {
|
|
94
94
|
offset: string;
|
|
95
95
|
identifier: string;
|
|
@@ -98,7 +98,6 @@ declare const WaypointSchema: z.ZodObject<{
|
|
|
98
98
|
}, {
|
|
99
99
|
name: string;
|
|
100
100
|
location: [number, number];
|
|
101
|
-
distance?: number | undefined;
|
|
102
101
|
metadata?: {
|
|
103
102
|
type: "charging-station";
|
|
104
103
|
name: string;
|
|
@@ -117,6 +116,7 @@ declare const WaypointSchema: z.ZodObject<{
|
|
|
117
116
|
} | {
|
|
118
117
|
type: "regular";
|
|
119
118
|
} | null | undefined;
|
|
119
|
+
distance?: number | undefined;
|
|
120
120
|
time_zone?: {
|
|
121
121
|
offset: string;
|
|
122
122
|
identifier: string;
|
|
@@ -163,7 +163,7 @@ declare const IncidentSchema: z.ZodObject<{
|
|
|
163
163
|
iso_3166_1_alpha3: string;
|
|
164
164
|
end_time: string;
|
|
165
165
|
long_description: string;
|
|
166
|
-
impact: "
|
|
166
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
167
167
|
affected_road_names: string[];
|
|
168
168
|
creation_time: string;
|
|
169
169
|
start_time: string;
|
|
@@ -189,7 +189,7 @@ declare const IncidentSchema: z.ZodObject<{
|
|
|
189
189
|
iso_3166_1_alpha3: string;
|
|
190
190
|
end_time: string;
|
|
191
191
|
long_description: string;
|
|
192
|
-
impact: "
|
|
192
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
193
193
|
affected_road_names: string[];
|
|
194
194
|
creation_time: string;
|
|
195
195
|
start_time: string;
|
|
@@ -2364,7 +2364,7 @@ declare const RouteLegSchema: z.ZodObject<{
|
|
|
2364
2364
|
iso_3166_1_alpha3: string;
|
|
2365
2365
|
end_time: string;
|
|
2366
2366
|
long_description: string;
|
|
2367
|
-
impact: "
|
|
2367
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
2368
2368
|
affected_road_names: string[];
|
|
2369
2369
|
creation_time: string;
|
|
2370
2370
|
start_time: string;
|
|
@@ -2390,7 +2390,7 @@ declare const RouteLegSchema: z.ZodObject<{
|
|
|
2390
2390
|
iso_3166_1_alpha3: string;
|
|
2391
2391
|
end_time: string;
|
|
2392
2392
|
long_description: string;
|
|
2393
|
-
impact: "
|
|
2393
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
2394
2394
|
affected_road_names: string[];
|
|
2395
2395
|
creation_time: string;
|
|
2396
2396
|
start_time: string;
|
|
@@ -2713,7 +2713,7 @@ declare const RouteLegSchema: z.ZodObject<{
|
|
|
2713
2713
|
iso_3166_1_alpha3: string;
|
|
2714
2714
|
end_time: string;
|
|
2715
2715
|
long_description: string;
|
|
2716
|
-
impact: "
|
|
2716
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
2717
2717
|
affected_road_names: string[];
|
|
2718
2718
|
creation_time: string;
|
|
2719
2719
|
start_time: string;
|
|
@@ -2918,7 +2918,7 @@ declare const RouteLegSchema: z.ZodObject<{
|
|
|
2918
2918
|
iso_3166_1_alpha3: string;
|
|
2919
2919
|
end_time: string;
|
|
2920
2920
|
long_description: string;
|
|
2921
|
-
impact: "
|
|
2921
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
2922
2922
|
affected_road_names: string[];
|
|
2923
2923
|
creation_time: string;
|
|
2924
2924
|
start_time: string;
|
|
@@ -3797,7 +3797,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
3797
3797
|
iso_3166_1_alpha3: string;
|
|
3798
3798
|
end_time: string;
|
|
3799
3799
|
long_description: string;
|
|
3800
|
-
impact: "
|
|
3800
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
3801
3801
|
affected_road_names: string[];
|
|
3802
3802
|
creation_time: string;
|
|
3803
3803
|
start_time: string;
|
|
@@ -3823,7 +3823,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
3823
3823
|
iso_3166_1_alpha3: string;
|
|
3824
3824
|
end_time: string;
|
|
3825
3825
|
long_description: string;
|
|
3826
|
-
impact: "
|
|
3826
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
3827
3827
|
affected_road_names: string[];
|
|
3828
3828
|
creation_time: string;
|
|
3829
3829
|
start_time: string;
|
|
@@ -4146,7 +4146,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4146
4146
|
iso_3166_1_alpha3: string;
|
|
4147
4147
|
end_time: string;
|
|
4148
4148
|
long_description: string;
|
|
4149
|
-
impact: "
|
|
4149
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
4150
4150
|
affected_road_names: string[];
|
|
4151
4151
|
creation_time: string;
|
|
4152
4152
|
start_time: string;
|
|
@@ -4351,7 +4351,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4351
4351
|
iso_3166_1_alpha3: string;
|
|
4352
4352
|
end_time: string;
|
|
4353
4353
|
long_description: string;
|
|
4354
|
-
impact: "
|
|
4354
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
4355
4355
|
affected_road_names: string[];
|
|
4356
4356
|
creation_time: string;
|
|
4357
4357
|
start_time: string;
|
|
@@ -4453,7 +4453,6 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4453
4453
|
}, "strip", z.ZodTypeAny, {
|
|
4454
4454
|
name: string;
|
|
4455
4455
|
location: [number, number];
|
|
4456
|
-
distance?: number | undefined;
|
|
4457
4456
|
metadata?: {
|
|
4458
4457
|
type: "charging-station";
|
|
4459
4458
|
name: string;
|
|
@@ -4472,6 +4471,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4472
4471
|
} | {
|
|
4473
4472
|
type: "regular";
|
|
4474
4473
|
} | null | undefined;
|
|
4474
|
+
distance?: number | undefined;
|
|
4475
4475
|
time_zone?: {
|
|
4476
4476
|
offset: string;
|
|
4477
4477
|
identifier: string;
|
|
@@ -4480,7 +4480,6 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4480
4480
|
}, {
|
|
4481
4481
|
name: string;
|
|
4482
4482
|
location: [number, number];
|
|
4483
|
-
distance?: number | undefined;
|
|
4484
4483
|
metadata?: {
|
|
4485
4484
|
type: "charging-station";
|
|
4486
4485
|
name: string;
|
|
@@ -4499,6 +4498,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4499
4498
|
} | {
|
|
4500
4499
|
type: "regular";
|
|
4501
4500
|
} | null | undefined;
|
|
4501
|
+
distance?: number | undefined;
|
|
4502
4502
|
time_zone?: {
|
|
4503
4503
|
offset: string;
|
|
4504
4504
|
identifier: string;
|
|
@@ -4718,7 +4718,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4718
4718
|
iso_3166_1_alpha3: string;
|
|
4719
4719
|
end_time: string;
|
|
4720
4720
|
long_description: string;
|
|
4721
|
-
impact: "
|
|
4721
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
4722
4722
|
affected_road_names: string[];
|
|
4723
4723
|
creation_time: string;
|
|
4724
4724
|
start_time: string;
|
|
@@ -4750,7 +4750,6 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4750
4750
|
waypoints?: {
|
|
4751
4751
|
name: string;
|
|
4752
4752
|
location: [number, number];
|
|
4753
|
-
distance?: number | undefined;
|
|
4754
4753
|
metadata?: {
|
|
4755
4754
|
type: "charging-station";
|
|
4756
4755
|
name: string;
|
|
@@ -4769,6 +4768,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4769
4768
|
} | {
|
|
4770
4769
|
type: "regular";
|
|
4771
4770
|
} | null | undefined;
|
|
4771
|
+
distance?: number | undefined;
|
|
4772
4772
|
time_zone?: {
|
|
4773
4773
|
offset: string;
|
|
4774
4774
|
identifier: string;
|
|
@@ -4978,7 +4978,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
4978
4978
|
iso_3166_1_alpha3: string;
|
|
4979
4979
|
end_time: string;
|
|
4980
4980
|
long_description: string;
|
|
4981
|
-
impact: "
|
|
4981
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
4982
4982
|
affected_road_names: string[];
|
|
4983
4983
|
creation_time: string;
|
|
4984
4984
|
start_time: string;
|
|
@@ -5010,7 +5010,6 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
5010
5010
|
waypoints?: {
|
|
5011
5011
|
name: string;
|
|
5012
5012
|
location: [number, number];
|
|
5013
|
-
distance?: number | undefined;
|
|
5014
5013
|
metadata?: {
|
|
5015
5014
|
type: "charging-station";
|
|
5016
5015
|
name: string;
|
|
@@ -5029,6 +5028,7 @@ declare const RouteSchema: z.ZodObject<{
|
|
|
5029
5028
|
} | {
|
|
5030
5029
|
type: "regular";
|
|
5031
5030
|
} | null | undefined;
|
|
5031
|
+
distance?: number | undefined;
|
|
5032
5032
|
time_zone?: {
|
|
5033
5033
|
offset: string;
|
|
5034
5034
|
identifier: string;
|
|
@@ -5901,7 +5901,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
5901
5901
|
iso_3166_1_alpha3: string;
|
|
5902
5902
|
end_time: string;
|
|
5903
5903
|
long_description: string;
|
|
5904
|
-
impact: "
|
|
5904
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
5905
5905
|
affected_road_names: string[];
|
|
5906
5906
|
creation_time: string;
|
|
5907
5907
|
start_time: string;
|
|
@@ -5927,7 +5927,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
5927
5927
|
iso_3166_1_alpha3: string;
|
|
5928
5928
|
end_time: string;
|
|
5929
5929
|
long_description: string;
|
|
5930
|
-
impact: "
|
|
5930
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
5931
5931
|
affected_road_names: string[];
|
|
5932
5932
|
creation_time: string;
|
|
5933
5933
|
start_time: string;
|
|
@@ -6250,7 +6250,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6250
6250
|
iso_3166_1_alpha3: string;
|
|
6251
6251
|
end_time: string;
|
|
6252
6252
|
long_description: string;
|
|
6253
|
-
impact: "
|
|
6253
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
6254
6254
|
affected_road_names: string[];
|
|
6255
6255
|
creation_time: string;
|
|
6256
6256
|
start_time: string;
|
|
@@ -6455,7 +6455,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6455
6455
|
iso_3166_1_alpha3: string;
|
|
6456
6456
|
end_time: string;
|
|
6457
6457
|
long_description: string;
|
|
6458
|
-
impact: "
|
|
6458
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
6459
6459
|
affected_road_names: string[];
|
|
6460
6460
|
creation_time: string;
|
|
6461
6461
|
start_time: string;
|
|
@@ -6557,7 +6557,6 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6557
6557
|
}, "strip", z.ZodTypeAny, {
|
|
6558
6558
|
name: string;
|
|
6559
6559
|
location: [number, number];
|
|
6560
|
-
distance?: number | undefined;
|
|
6561
6560
|
metadata?: {
|
|
6562
6561
|
type: "charging-station";
|
|
6563
6562
|
name: string;
|
|
@@ -6576,6 +6575,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6576
6575
|
} | {
|
|
6577
6576
|
type: "regular";
|
|
6578
6577
|
} | null | undefined;
|
|
6578
|
+
distance?: number | undefined;
|
|
6579
6579
|
time_zone?: {
|
|
6580
6580
|
offset: string;
|
|
6581
6581
|
identifier: string;
|
|
@@ -6584,7 +6584,6 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6584
6584
|
}, {
|
|
6585
6585
|
name: string;
|
|
6586
6586
|
location: [number, number];
|
|
6587
|
-
distance?: number | undefined;
|
|
6588
6587
|
metadata?: {
|
|
6589
6588
|
type: "charging-station";
|
|
6590
6589
|
name: string;
|
|
@@ -6603,6 +6602,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6603
6602
|
} | {
|
|
6604
6603
|
type: "regular";
|
|
6605
6604
|
} | null | undefined;
|
|
6605
|
+
distance?: number | undefined;
|
|
6606
6606
|
time_zone?: {
|
|
6607
6607
|
offset: string;
|
|
6608
6608
|
identifier: string;
|
|
@@ -6822,7 +6822,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6822
6822
|
iso_3166_1_alpha3: string;
|
|
6823
6823
|
end_time: string;
|
|
6824
6824
|
long_description: string;
|
|
6825
|
-
impact: "
|
|
6825
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
6826
6826
|
affected_road_names: string[];
|
|
6827
6827
|
creation_time: string;
|
|
6828
6828
|
start_time: string;
|
|
@@ -6854,7 +6854,6 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6854
6854
|
waypoints?: {
|
|
6855
6855
|
name: string;
|
|
6856
6856
|
location: [number, number];
|
|
6857
|
-
distance?: number | undefined;
|
|
6858
6857
|
metadata?: {
|
|
6859
6858
|
type: "charging-station";
|
|
6860
6859
|
name: string;
|
|
@@ -6873,6 +6872,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
6873
6872
|
} | {
|
|
6874
6873
|
type: "regular";
|
|
6875
6874
|
} | null | undefined;
|
|
6875
|
+
distance?: number | undefined;
|
|
6876
6876
|
time_zone?: {
|
|
6877
6877
|
offset: string;
|
|
6878
6878
|
identifier: string;
|
|
@@ -7082,7 +7082,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7082
7082
|
iso_3166_1_alpha3: string;
|
|
7083
7083
|
end_time: string;
|
|
7084
7084
|
long_description: string;
|
|
7085
|
-
impact: "
|
|
7085
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
7086
7086
|
affected_road_names: string[];
|
|
7087
7087
|
creation_time: string;
|
|
7088
7088
|
start_time: string;
|
|
@@ -7114,7 +7114,6 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7114
7114
|
waypoints?: {
|
|
7115
7115
|
name: string;
|
|
7116
7116
|
location: [number, number];
|
|
7117
|
-
distance?: number | undefined;
|
|
7118
7117
|
metadata?: {
|
|
7119
7118
|
type: "charging-station";
|
|
7120
7119
|
name: string;
|
|
@@ -7133,6 +7132,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7133
7132
|
} | {
|
|
7134
7133
|
type: "regular";
|
|
7135
7134
|
} | null | undefined;
|
|
7135
|
+
distance?: number | undefined;
|
|
7136
7136
|
time_zone?: {
|
|
7137
7137
|
offset: string;
|
|
7138
7138
|
identifier: string;
|
|
@@ -7500,7 +7500,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7500
7500
|
iso_3166_1_alpha3: string;
|
|
7501
7501
|
end_time: string;
|
|
7502
7502
|
long_description: string;
|
|
7503
|
-
impact: "
|
|
7503
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
7504
7504
|
affected_road_names: string[];
|
|
7505
7505
|
creation_time: string;
|
|
7506
7506
|
start_time: string;
|
|
@@ -7532,7 +7532,6 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7532
7532
|
waypoints?: {
|
|
7533
7533
|
name: string;
|
|
7534
7534
|
location: [number, number];
|
|
7535
|
-
distance?: number | undefined;
|
|
7536
7535
|
metadata?: {
|
|
7537
7536
|
type: "charging-station";
|
|
7538
7537
|
name: string;
|
|
@@ -7551,6 +7550,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7551
7550
|
} | {
|
|
7552
7551
|
type: "regular";
|
|
7553
7552
|
} | null | undefined;
|
|
7553
|
+
distance?: number | undefined;
|
|
7554
7554
|
time_zone?: {
|
|
7555
7555
|
offset: string;
|
|
7556
7556
|
identifier: string;
|
|
@@ -7792,7 +7792,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7792
7792
|
iso_3166_1_alpha3: string;
|
|
7793
7793
|
end_time: string;
|
|
7794
7794
|
long_description: string;
|
|
7795
|
-
impact: "
|
|
7795
|
+
impact: "critical" | "unknown" | "low" | "major" | "minor";
|
|
7796
7796
|
affected_road_names: string[];
|
|
7797
7797
|
creation_time: string;
|
|
7798
7798
|
start_time: string;
|
|
@@ -7824,7 +7824,6 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7824
7824
|
waypoints?: {
|
|
7825
7825
|
name: string;
|
|
7826
7826
|
location: [number, number];
|
|
7827
|
-
distance?: number | undefined;
|
|
7828
7827
|
metadata?: {
|
|
7829
7828
|
type: "charging-station";
|
|
7830
7829
|
name: string;
|
|
@@ -7843,6 +7842,7 @@ export declare const DirectionsResponseSchema: z.ZodObject<{
|
|
|
7843
7842
|
} | {
|
|
7844
7843
|
type: "regular";
|
|
7845
7844
|
} | null | undefined;
|
|
7845
|
+
distance?: number | undefined;
|
|
7846
7846
|
time_zone?: {
|
|
7847
7847
|
offset: string;
|
|
7848
7848
|
identifier: string;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export { AreaTool } from './area-tool/AreaTool.js';
|
|
2
|
+
export { BearingTool } from './bearing-tool/BearingTool.js';
|
|
3
|
+
export { BoundingBoxTool } from './bounding-box-tool/BoundingBoxTool.js';
|
|
4
|
+
export { BufferTool } from './buffer-tool/BufferTool.js';
|
|
5
|
+
export { CategoryListTool } from './category-list-tool/CategoryListTool.js';
|
|
6
|
+
export { CategorySearchTool } from './category-search-tool/CategorySearchTool.js';
|
|
7
|
+
export { CentroidTool } from './centroid-tool/CentroidTool.js';
|
|
8
|
+
export { DirectionsTool } from './directions-tool/DirectionsTool.js';
|
|
9
|
+
export { DistanceTool } from './distance-tool/DistanceTool.js';
|
|
10
|
+
export { IsochroneTool } from './isochrone-tool/IsochroneTool.js';
|
|
11
|
+
export { MapMatchingTool } from './map-matching-tool/MapMatchingTool.js';
|
|
12
|
+
export { MatrixTool } from './matrix-tool/MatrixTool.js';
|
|
13
|
+
export { MidpointTool } from './midpoint-tool/MidpointTool.js';
|
|
14
|
+
export { OptimizationTool } from './optimization-tool/OptimizationTool.js';
|
|
15
|
+
export { PointInPolygonTool } from './point-in-polygon-tool/PointInPolygonTool.js';
|
|
16
|
+
export { ResourceReaderTool } from './resource-reader-tool/ResourceReaderTool.js';
|
|
17
|
+
export { ReverseGeocodeTool } from './reverse-geocode-tool/ReverseGeocodeTool.js';
|
|
18
|
+
export { SearchAndGeocodeTool } from './search-and-geocode-tool/SearchAndGeocodeTool.js';
|
|
19
|
+
export { SimplifyTool } from './simplify-tool/SimplifyTool.js';
|
|
20
|
+
export { StaticMapImageTool } from './static-map-image-tool/StaticMapImageTool.js';
|
|
21
|
+
import { AreaTool } from './area-tool/AreaTool.js';
|
|
22
|
+
import { BearingTool } from './bearing-tool/BearingTool.js';
|
|
23
|
+
import { BoundingBoxTool } from './bounding-box-tool/BoundingBoxTool.js';
|
|
24
|
+
import { BufferTool } from './buffer-tool/BufferTool.js';
|
|
25
|
+
import { CategoryListTool } from './category-list-tool/CategoryListTool.js';
|
|
26
|
+
import { CategorySearchTool } from './category-search-tool/CategorySearchTool.js';
|
|
27
|
+
import { CentroidTool } from './centroid-tool/CentroidTool.js';
|
|
28
|
+
import { DirectionsTool } from './directions-tool/DirectionsTool.js';
|
|
29
|
+
import { DistanceTool } from './distance-tool/DistanceTool.js';
|
|
30
|
+
import { IsochroneTool } from './isochrone-tool/IsochroneTool.js';
|
|
31
|
+
import { MapMatchingTool } from './map-matching-tool/MapMatchingTool.js';
|
|
32
|
+
import { MatrixTool } from './matrix-tool/MatrixTool.js';
|
|
33
|
+
import { MidpointTool } from './midpoint-tool/MidpointTool.js';
|
|
34
|
+
import { OptimizationTool } from './optimization-tool/OptimizationTool.js';
|
|
35
|
+
import { PointInPolygonTool } from './point-in-polygon-tool/PointInPolygonTool.js';
|
|
36
|
+
import { ResourceReaderTool } from './resource-reader-tool/ResourceReaderTool.js';
|
|
37
|
+
import { ReverseGeocodeTool } from './reverse-geocode-tool/ReverseGeocodeTool.js';
|
|
38
|
+
import { SearchAndGeocodeTool } from './search-and-geocode-tool/SearchAndGeocodeTool.js';
|
|
39
|
+
import { SimplifyTool } from './simplify-tool/SimplifyTool.js';
|
|
40
|
+
import { StaticMapImageTool } from './static-map-image-tool/StaticMapImageTool.js';
|
|
41
|
+
/** Compute area of a polygon in square meters or acres */
|
|
42
|
+
export declare const area: AreaTool;
|
|
43
|
+
/** Calculate bearing between two points */
|
|
44
|
+
export declare const bearing: BearingTool;
|
|
45
|
+
/** Calculate bounding box for geometries */
|
|
46
|
+
export declare const boundingBox: BoundingBoxTool;
|
|
47
|
+
/** Create buffer around geometries */
|
|
48
|
+
export declare const buffer: BufferTool;
|
|
49
|
+
/** List available search categories (fallback for clients without resource support) */
|
|
50
|
+
export declare const categoryList: CategoryListTool;
|
|
51
|
+
/** Search for places by category */
|
|
52
|
+
export declare const categorySearch: CategorySearchTool;
|
|
53
|
+
/** Calculate centroid of geometries */
|
|
54
|
+
export declare const centroid: CentroidTool;
|
|
55
|
+
/** Get directions between waypoints */
|
|
56
|
+
export declare const directions: DirectionsTool;
|
|
57
|
+
/** Calculate distance between points */
|
|
58
|
+
export declare const distance: DistanceTool;
|
|
59
|
+
/** Calculate travel time isochrones */
|
|
60
|
+
export declare const isochrone: IsochroneTool;
|
|
61
|
+
/** Match GPS traces to road network */
|
|
62
|
+
export declare const mapMatching: MapMatchingTool;
|
|
63
|
+
/** Calculate travel time matrix between multiple points */
|
|
64
|
+
export declare const matrix: MatrixTool;
|
|
65
|
+
/** Find midpoint between two points */
|
|
66
|
+
export declare const midpoint: MidpointTool;
|
|
67
|
+
/** Solve vehicle routing optimization problems */
|
|
68
|
+
export declare const optimization: OptimizationTool;
|
|
69
|
+
/** Check if point is inside polygon */
|
|
70
|
+
export declare const pointInPolygon: PointInPolygonTool;
|
|
71
|
+
/** Read MCP resources by URI (fallback for clients without resource support) */
|
|
72
|
+
export declare const resourceReader: ResourceReaderTool;
|
|
73
|
+
/** Reverse geocode coordinates to addresses */
|
|
74
|
+
export declare const reverseGeocode: ReverseGeocodeTool;
|
|
75
|
+
/** Search for places and geocode addresses */
|
|
76
|
+
export declare const searchAndGeocode: SearchAndGeocodeTool;
|
|
77
|
+
/** Simplify geometries by reducing points */
|
|
78
|
+
export declare const simplify: SimplifyTool;
|
|
79
|
+
/** Generate static map images */
|
|
80
|
+
export declare const staticMapImage: StaticMapImageTool;
|
|
81
|
+
export { getAllTools, getCoreTools, getElicitationTools, getResourceFallbackTools, getToolByName, type ToolInstance } from './toolRegistry.js';
|
|
82
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,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uC;AACvC,eAAO,MAAM,WAAW,iBAAuC,CAAC;AAEhE,2DAA2D;AAC3D,eAAO,MAAM,MAAM,YAAkC,CAAC;AAEtD,uCAAuC;AACvC,eAAO,MAAM,QAAQ,cAAqB,CAAC;AAE3C,kDAAkD;AAClD,eAAO,MAAM,YAAY,kBAAwC,CAAC;AAElE,uCAAuC;AACvC,eAAO,MAAM,cAAc,oBAA2B,CAAC;AAEvD,gFAAgF;AAChF,eAAO,MAAM,cAAc,oBAA2B,CAAC;AAEvD,+CAA+C;AAC/C,eAAO,MAAM,cAAc,oBAA0C,CAAC;AAEtE,8CAA8C;AAC9C,eAAO,MAAM,gBAAgB,sBAA4C,CAAC;AAE1E,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,cAAqB,CAAC;AAE3C,iCAAiC;AACjC,eAAO,MAAM,cAAc,oBAA0C,CAAC;AAGtE,OAAO,EACL,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EACb,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Copyright (c) Mapbox, Inc.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
/**
|
|
4
|
+
* @module tools
|
|
5
|
+
*
|
|
6
|
+
* Public API for Mapbox MCP tools. This module exports:
|
|
7
|
+
* - Tool classes for custom instantiation
|
|
8
|
+
* - Pre-configured tool instances ready to use
|
|
9
|
+
* - Registry functions for batch access
|
|
10
|
+
*
|
|
11
|
+
* @example Simple usage with pre-configured instances
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { directions, searchAndGeocode } from '@mapbox/mcp-server/tools';
|
|
14
|
+
*
|
|
15
|
+
* // Use directly - httpRequest already configured
|
|
16
|
+
* const result = await directions.execute({ ... });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example Advanced usage with custom pipeline
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { DirectionsTool } from '@mapbox/mcp-server/tools';
|
|
22
|
+
* import { httpRequest } from '@mapbox/mcp-server/utils';
|
|
23
|
+
*
|
|
24
|
+
* const customTool = new DirectionsTool({ httpRequest });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
import { httpRequest } from '../utils/httpPipeline.js';
|
|
28
|
+
// Export all tool classes
|
|
29
|
+
export { AreaTool } from './area-tool/AreaTool.js';
|
|
30
|
+
export { BearingTool } from './bearing-tool/BearingTool.js';
|
|
31
|
+
export { BoundingBoxTool } from './bounding-box-tool/BoundingBoxTool.js';
|
|
32
|
+
export { BufferTool } from './buffer-tool/BufferTool.js';
|
|
33
|
+
export { CategoryListTool } from './category-list-tool/CategoryListTool.js';
|
|
34
|
+
export { CategorySearchTool } from './category-search-tool/CategorySearchTool.js';
|
|
35
|
+
export { CentroidTool } from './centroid-tool/CentroidTool.js';
|
|
36
|
+
export { DirectionsTool } from './directions-tool/DirectionsTool.js';
|
|
37
|
+
export { DistanceTool } from './distance-tool/DistanceTool.js';
|
|
38
|
+
export { IsochroneTool } from './isochrone-tool/IsochroneTool.js';
|
|
39
|
+
export { MapMatchingTool } from './map-matching-tool/MapMatchingTool.js';
|
|
40
|
+
export { MatrixTool } from './matrix-tool/MatrixTool.js';
|
|
41
|
+
export { MidpointTool } from './midpoint-tool/MidpointTool.js';
|
|
42
|
+
export { OptimizationTool } from './optimization-tool/OptimizationTool.js';
|
|
43
|
+
export { PointInPolygonTool } from './point-in-polygon-tool/PointInPolygonTool.js';
|
|
44
|
+
export { ResourceReaderTool } from './resource-reader-tool/ResourceReaderTool.js';
|
|
45
|
+
export { ReverseGeocodeTool } from './reverse-geocode-tool/ReverseGeocodeTool.js';
|
|
46
|
+
export { SearchAndGeocodeTool } from './search-and-geocode-tool/SearchAndGeocodeTool.js';
|
|
47
|
+
export { SimplifyTool } from './simplify-tool/SimplifyTool.js';
|
|
48
|
+
export { StaticMapImageTool } from './static-map-image-tool/StaticMapImageTool.js';
|
|
49
|
+
// Import tool classes for instantiation
|
|
50
|
+
import { AreaTool } from './area-tool/AreaTool.js';
|
|
51
|
+
import { BearingTool } from './bearing-tool/BearingTool.js';
|
|
52
|
+
import { BoundingBoxTool } from './bounding-box-tool/BoundingBoxTool.js';
|
|
53
|
+
import { BufferTool } from './buffer-tool/BufferTool.js';
|
|
54
|
+
import { CategoryListTool } from './category-list-tool/CategoryListTool.js';
|
|
55
|
+
import { CategorySearchTool } from './category-search-tool/CategorySearchTool.js';
|
|
56
|
+
import { CentroidTool } from './centroid-tool/CentroidTool.js';
|
|
57
|
+
import { DirectionsTool } from './directions-tool/DirectionsTool.js';
|
|
58
|
+
import { DistanceTool } from './distance-tool/DistanceTool.js';
|
|
59
|
+
import { IsochroneTool } from './isochrone-tool/IsochroneTool.js';
|
|
60
|
+
import { MapMatchingTool } from './map-matching-tool/MapMatchingTool.js';
|
|
61
|
+
import { MatrixTool } from './matrix-tool/MatrixTool.js';
|
|
62
|
+
import { MidpointTool } from './midpoint-tool/MidpointTool.js';
|
|
63
|
+
import { OptimizationTool } from './optimization-tool/OptimizationTool.js';
|
|
64
|
+
import { PointInPolygonTool } from './point-in-polygon-tool/PointInPolygonTool.js';
|
|
65
|
+
import { ResourceReaderTool } from './resource-reader-tool/ResourceReaderTool.js';
|
|
66
|
+
import { ReverseGeocodeTool } from './reverse-geocode-tool/ReverseGeocodeTool.js';
|
|
67
|
+
import { SearchAndGeocodeTool } from './search-and-geocode-tool/SearchAndGeocodeTool.js';
|
|
68
|
+
import { SimplifyTool } from './simplify-tool/SimplifyTool.js';
|
|
69
|
+
import { StaticMapImageTool } from './static-map-image-tool/StaticMapImageTool.js';
|
|
70
|
+
// Export pre-configured tool instances with short, clean names
|
|
71
|
+
// Note: Import path already indicates these are tools, so we omit the "Tool" suffix
|
|
72
|
+
/** Compute area of a polygon in square meters or acres */
|
|
73
|
+
export const area = new AreaTool();
|
|
74
|
+
/** Calculate bearing between two points */
|
|
75
|
+
export const bearing = new BearingTool();
|
|
76
|
+
/** Calculate bounding box for geometries */
|
|
77
|
+
export const boundingBox = new BoundingBoxTool();
|
|
78
|
+
/** Create buffer around geometries */
|
|
79
|
+
export const buffer = new BufferTool();
|
|
80
|
+
/** List available search categories (fallback for clients without resource support) */
|
|
81
|
+
export const categoryList = new CategoryListTool({ httpRequest });
|
|
82
|
+
/** Search for places by category */
|
|
83
|
+
export const categorySearch = new CategorySearchTool({ httpRequest });
|
|
84
|
+
/** Calculate centroid of geometries */
|
|
85
|
+
export const centroid = new CentroidTool();
|
|
86
|
+
/** Get directions between waypoints */
|
|
87
|
+
export const directions = new DirectionsTool({ httpRequest });
|
|
88
|
+
/** Calculate distance between points */
|
|
89
|
+
export const distance = new DistanceTool();
|
|
90
|
+
/** Calculate travel time isochrones */
|
|
91
|
+
export const isochrone = new IsochroneTool({ httpRequest });
|
|
92
|
+
/** Match GPS traces to road network */
|
|
93
|
+
export const mapMatching = new MapMatchingTool({ httpRequest });
|
|
94
|
+
/** Calculate travel time matrix between multiple points */
|
|
95
|
+
export const matrix = new MatrixTool({ httpRequest });
|
|
96
|
+
/** Find midpoint between two points */
|
|
97
|
+
export const midpoint = new MidpointTool();
|
|
98
|
+
/** Solve vehicle routing optimization problems */
|
|
99
|
+
export const optimization = new OptimizationTool({ httpRequest });
|
|
100
|
+
/** Check if point is inside polygon */
|
|
101
|
+
export const pointInPolygon = new PointInPolygonTool();
|
|
102
|
+
/** Read MCP resources by URI (fallback for clients without resource support) */
|
|
103
|
+
export const resourceReader = new ResourceReaderTool();
|
|
104
|
+
/** Reverse geocode coordinates to addresses */
|
|
105
|
+
export const reverseGeocode = new ReverseGeocodeTool({ httpRequest });
|
|
106
|
+
/** Search for places and geocode addresses */
|
|
107
|
+
export const searchAndGeocode = new SearchAndGeocodeTool({ httpRequest });
|
|
108
|
+
/** Simplify geometries by reducing points */
|
|
109
|
+
export const simplify = new SimplifyTool();
|
|
110
|
+
/** Generate static map images */
|
|
111
|
+
export const staticMapImage = new StaticMapImageTool({ httpRequest });
|
|
112
|
+
// Export registry functions for batch access
|
|
113
|
+
export { getAllTools, getCoreTools, getElicitationTools, getResourceFallbackTools, getToolByName } from './toolRegistry.js';
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,kCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,0BAA0B;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,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BAAgB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;AAElE,uCAAuC;AACvC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,kBAAkB,EAAE,CAAC;AAEvD,gFAAgF;AAChF,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,kBAAkB,EAAE,CAAC;AAEvD,+CAA+C;AAC/C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,kBAAkB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;AAEtE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,oBAAoB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;AAE1E,6CAA6C;AAC7C,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;AAE3C,iCAAiC;AACjC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,kBAAkB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;AAEtE,6CAA6C;AAC7C,OAAO,EACL,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EAEd,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IsochroneTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/isochrone-tool/IsochroneTool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IsochroneTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/isochrone-tool/IsochroneTool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EACL,uBAAuB,EAExB,MAAM,kCAAkC,CAAC;AAG1C,qBAAa,aAAc,SAAQ,kBAAkB,CACnD,OAAO,oBAAoB,EAC3B,OAAO,uBAAuB,CAC/B;IACC,IAAI,SAAoB;IACxB,WAAW,SAIuD;IAClE,WAAW;;;;;;MAMT;gBAEU,MAAM,EAAE;QAAE,WAAW,EAAE,WAAW,CAAA;KAAE;IAQhD,OAAO,CAAC,uBAAuB;cAwCf,OAAO,CACrB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,EAC3C,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC;CAyH3B"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Copyright (c) Mapbox, Inc.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
+
import { randomBytes } from 'node:crypto';
|
|
3
4
|
import { MapboxApiBasedTool } from '../MapboxApiBasedTool.js';
|
|
4
5
|
import { IsochroneInputSchema } from './IsochroneTool.input.schema.js';
|
|
5
6
|
import { IsochroneResponseSchema } from './IsochroneTool.output.schema.js';
|
|
7
|
+
import { temporaryResourceManager } from '../../utils/temporaryResourceManager.js';
|
|
6
8
|
export class IsochroneTool extends MapboxApiBasedTool {
|
|
7
9
|
name = 'isochrone_tool';
|
|
8
10
|
description = `Computes areas that are reachable within a specified amount of time from a location, and returns the reachable regions as contours of Polygons or LineStrings in GeoJSON format that you can display on a map.
|
|
@@ -110,6 +112,24 @@ export class IsochroneTool extends MapboxApiBasedTool {
|
|
|
110
112
|
};
|
|
111
113
|
}
|
|
112
114
|
const data = await response.json();
|
|
115
|
+
// Check response size and conditionally create temporary resource
|
|
116
|
+
const RESPONSE_SIZE_THRESHOLD = 50 * 1024; // 50KB
|
|
117
|
+
const responseText = JSON.stringify(data, null, 2);
|
|
118
|
+
const responseSize = responseText.length;
|
|
119
|
+
if (responseSize > RESPONSE_SIZE_THRESHOLD) {
|
|
120
|
+
const resourceId = randomBytes(16).toString('hex');
|
|
121
|
+
const resourceUri = `mapbox://temp/isochrone-${resourceId}`;
|
|
122
|
+
temporaryResourceManager.create(resourceId, resourceUri, data, {
|
|
123
|
+
toolName: this.name,
|
|
124
|
+
size: responseSize
|
|
125
|
+
});
|
|
126
|
+
const contourCount = data.features?.length ?? 0;
|
|
127
|
+
const summaryText = `Isochrone computed: ${contourCount} contour${contourCount !== 1 ? 's' : ''}\n\n⚠️ Full response (${Math.round(responseSize / 1024)}KB) exceeds context limit.\n\nFull GeoJSON stored as temporary resource.\nResource URI: ${resourceUri}\nTTL: 30 minutes\n\nUse the MCP resource API to retrieve full GeoJSON if needed.`;
|
|
128
|
+
return {
|
|
129
|
+
content: [{ type: 'text', text: summaryText }],
|
|
130
|
+
isError: false
|
|
131
|
+
};
|
|
132
|
+
}
|
|
113
133
|
// Validate the response against our schema
|
|
114
134
|
const parsedData = IsochroneResponseSchema.safeParse(data);
|
|
115
135
|
if (parsedData.success) {
|
|
@@ -125,7 +145,7 @@ export class IsochroneTool extends MapboxApiBasedTool {
|
|
|
125
145
|
// Invalid response - fall back to JSON string for backward compatibility
|
|
126
146
|
this.log('warning', `IsochroneTool: Response validation failed: ${parsedData.error.message}`);
|
|
127
147
|
return {
|
|
128
|
-
content: [{ type: 'text', text:
|
|
148
|
+
content: [{ type: 'text', text: responseText }],
|
|
129
149
|
structuredContent: data,
|
|
130
150
|
isError: false
|
|
131
151
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IsochroneTool.js","sourceRoot":"","sources":["../../../../src/tools/isochrone-tool/IsochroneTool.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,kCAAkC;
|
|
1
|
+
{"version":3,"file":"IsochroneTool.js","sourceRoot":"","sources":["../../../../src/tools/isochrone-tool/IsochroneTool.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EA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