@mapbox/mcp-server 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -19
- package/dist/commonjs/tools/{poi-search-tool/PoiSearchTool.d.ts → search-and-geocode-tool/SearchAndGeocodeTool.d.ts} +8 -20
- package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.d.ts.map +1 -0
- package/dist/commonjs/tools/{poi-search-tool/PoiSearchTool.js → search-and-geocode-tool/SearchAndGeocodeTool.js} +32 -64
- package/dist/commonjs/tools/search-and-geocode-tool/SearchAndGeocodeTool.js.map +1 -0
- package/dist/commonjs/tools/toolRegistry.d.ts +2 -3
- package/dist/commonjs/tools/toolRegistry.d.ts.map +1 -1
- package/dist/commonjs/tools/toolRegistry.js +3 -5
- package/dist/commonjs/tools/toolRegistry.js.map +1 -1
- package/dist/commonjs/version.json +3 -3
- package/dist/esm/tools/{poi-search-tool/PoiSearchTool.d.ts → search-and-geocode-tool/SearchAndGeocodeTool.d.ts} +8 -20
- package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.d.ts.map +1 -0
- package/dist/esm/tools/{poi-search-tool/PoiSearchTool.js → search-and-geocode-tool/SearchAndGeocodeTool.js} +30 -62
- package/dist/esm/tools/search-and-geocode-tool/SearchAndGeocodeTool.js.map +1 -0
- package/dist/esm/tools/toolRegistry.d.ts +2 -3
- package/dist/esm/tools/toolRegistry.d.ts.map +1 -1
- package/dist/esm/tools/toolRegistry.js +3 -5
- package/dist/esm/tools/toolRegistry.js.map +1 -1
- package/dist/esm/version.json +3 -3
- package/package.json +1 -1
- package/dist/commonjs/tools/forward-geocode-tool/ForwardGeocodeTool.d.ts +0 -98
- package/dist/commonjs/tools/forward-geocode-tool/ForwardGeocodeTool.d.ts.map +0 -1
- package/dist/commonjs/tools/forward-geocode-tool/ForwardGeocodeTool.js +0 -212
- package/dist/commonjs/tools/forward-geocode-tool/ForwardGeocodeTool.js.map +0 -1
- package/dist/commonjs/tools/poi-search-tool/PoiSearchTool.d.ts.map +0 -1
- package/dist/commonjs/tools/poi-search-tool/PoiSearchTool.js.map +0 -1
- package/dist/esm/tools/forward-geocode-tool/ForwardGeocodeTool.d.ts +0 -98
- package/dist/esm/tools/forward-geocode-tool/ForwardGeocodeTool.d.ts.map +0 -1
- package/dist/esm/tools/forward-geocode-tool/ForwardGeocodeTool.js +0 -208
- package/dist/esm/tools/forward-geocode-tool/ForwardGeocodeTool.js.map +0 -1
- package/dist/esm/tools/poi-search-tool/PoiSearchTool.d.ts.map +0 -1
- package/dist/esm/tools/poi-search-tool/PoiSearchTool.js.map +0 -1
package/README.md
CHANGED
|
@@ -107,15 +107,6 @@ Generates static map images using the [Mapbox static image API](https://docs.map
|
|
|
107
107
|
- Overlay options including polylines and polygons
|
|
108
108
|
- Auto-fitting to specified coordinates
|
|
109
109
|
|
|
110
|
-
#### POI search tool
|
|
111
|
-
|
|
112
|
-
Finds specific points of interest or brand locations by name using the [Mapbox Search Box forward search API](https://docs.mapbox.com/api/search/search-box/#search-request). Features include:
|
|
113
|
-
|
|
114
|
-
- Search for specific points of interest by proper name or unique brand (e.g., "Amalie Arena", "Starbucks")
|
|
115
|
-
- Find all nearby branches of a brand (e.g., "Macy's stores near me")
|
|
116
|
-
- Geographic proximity biasing for more relevant results
|
|
117
|
-
- Support for multiple languages and countries
|
|
118
|
-
|
|
119
110
|
#### Category search tool
|
|
120
111
|
|
|
121
112
|
Performs a category search using the [Mapbox Search Box category search API](https://docs.mapbox.com/api/search/search-box/#category-search). Features include:
|
|
@@ -126,16 +117,6 @@ Performs a category search using the [Mapbox Search Box category search API](htt
|
|
|
126
117
|
- Rich metadata for each result
|
|
127
118
|
- Support for multiple languages
|
|
128
119
|
|
|
129
|
-
#### Forward geocoding tool
|
|
130
|
-
|
|
131
|
-
Performs forward geocoding using the [Mapbox geocoding V6 API](https://docs.mapbox.com/api/search/geocoding/#forward-geocoding-with-search-text-input). Features include:
|
|
132
|
-
|
|
133
|
-
- Convert addresses or place names to geographic coordinates
|
|
134
|
-
- Fuzzy matching for partial or misspelled inputs
|
|
135
|
-
- Results filtering by country, region, or bounding box
|
|
136
|
-
- Customizable result limits
|
|
137
|
-
- Multiple language support
|
|
138
|
-
|
|
139
120
|
#### Reverse geocoding tool
|
|
140
121
|
|
|
141
122
|
Performs reverse geocoding using the [Mapbox geocoding V6 API](https://docs.mapbox.com/api/search/geocoding/#reverse-geocoding). Features include:
|
|
@@ -175,6 +156,11 @@ Computes areas that are reachable within a specified amount of times from a loca
|
|
|
175
156
|
- Optional departure or arrival time specification
|
|
176
157
|
- Color customization for visualization
|
|
177
158
|
|
|
159
|
+
#### Search and geocode tool
|
|
160
|
+
|
|
161
|
+
Uses the [Mapbox Search Box Text Search API](https://docs.mapbox.com/api/search/search-box/#search-request) endpoint to power searching for and geocoding POIs, addresses, places, and any other types supported by that API.
|
|
162
|
+
This tool consolidates the functionality that was previously provided by the ForwardGeocodeTool and PoiSearchTool (from earlier versions of this MCP server) into a single tool.
|
|
163
|
+
|
|
178
164
|
# Development
|
|
179
165
|
|
|
180
166
|
## Inspecting server
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MapboxApiBasedTool } from '../MapboxApiBasedTool.js';
|
|
3
|
-
declare const
|
|
3
|
+
declare const SearchAndGeocodeInputSchema: z.ZodObject<{
|
|
4
4
|
q: z.ZodString;
|
|
5
5
|
language: z.ZodOptional<z.ZodString>;
|
|
6
|
-
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
7
6
|
proximity: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
8
7
|
longitude: z.ZodNumber;
|
|
9
8
|
latitude: z.ZodNumber;
|
|
@@ -13,10 +12,7 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
13
12
|
}, {
|
|
14
13
|
longitude: number;
|
|
15
14
|
latitude: number;
|
|
16
|
-
}>, z.ZodEffects<z.ZodString, "ip" |
|
|
17
|
-
longitude: any;
|
|
18
|
-
latitude: any;
|
|
19
|
-
}, string>]>>;
|
|
15
|
+
}>, z.ZodEffects<z.ZodString, "ip" | [number, number], string>]>>;
|
|
20
16
|
bbox: z.ZodOptional<z.ZodObject<{
|
|
21
17
|
minLongitude: z.ZodNumber;
|
|
22
18
|
minLatitude: z.ZodNumber;
|
|
@@ -49,19 +45,13 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
49
45
|
longitude: number;
|
|
50
46
|
latitude: number;
|
|
51
47
|
}>>;
|
|
52
|
-
format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["json_string", "formatted_text"]>>>;
|
|
53
48
|
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
limit: number;
|
|
55
|
-
format: "json_string" | "formatted_text";
|
|
56
49
|
q: string;
|
|
57
50
|
language?: string | undefined;
|
|
58
51
|
proximity?: "ip" | {
|
|
59
52
|
longitude: number;
|
|
60
53
|
latitude: number;
|
|
61
|
-
} |
|
|
62
|
-
longitude: any;
|
|
63
|
-
latitude: any;
|
|
64
|
-
} | undefined;
|
|
54
|
+
} | [number, number] | undefined;
|
|
65
55
|
bbox?: {
|
|
66
56
|
minLongitude: number;
|
|
67
57
|
minLatitude: number;
|
|
@@ -81,7 +71,6 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
81
71
|
}, {
|
|
82
72
|
q: string;
|
|
83
73
|
language?: string | undefined;
|
|
84
|
-
limit?: number | undefined;
|
|
85
74
|
proximity?: string | {
|
|
86
75
|
longitude: number;
|
|
87
76
|
latitude: number;
|
|
@@ -93,7 +82,6 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
93
82
|
maxLatitude: number;
|
|
94
83
|
} | undefined;
|
|
95
84
|
country?: string[] | undefined;
|
|
96
|
-
format?: "json_string" | "formatted_text" | undefined;
|
|
97
85
|
types?: string[] | undefined;
|
|
98
86
|
poi_category?: string[] | undefined;
|
|
99
87
|
auto_complete?: boolean | undefined;
|
|
@@ -104,16 +92,16 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
104
92
|
latitude: number;
|
|
105
93
|
} | undefined;
|
|
106
94
|
}>;
|
|
107
|
-
export declare class
|
|
95
|
+
export declare class SearchAndGeocodeTool extends MapboxApiBasedTool<typeof SearchAndGeocodeInputSchema> {
|
|
96
|
+
private fetchImpl;
|
|
108
97
|
name: string;
|
|
109
98
|
description: string;
|
|
110
|
-
|
|
111
|
-
constructor(fetch?: typeof globalThis.fetch);
|
|
99
|
+
constructor(fetchImpl?: typeof fetch);
|
|
112
100
|
private formatGeoJsonToText;
|
|
113
|
-
protected execute(input: z.infer<typeof
|
|
101
|
+
protected execute(input: z.infer<typeof SearchAndGeocodeInputSchema>, accessToken: string): Promise<{
|
|
114
102
|
type: 'text';
|
|
115
103
|
text: string;
|
|
116
104
|
}>;
|
|
117
105
|
}
|
|
118
106
|
export {};
|
|
119
|
-
//# sourceMappingURL=
|
|
107
|
+
//# sourceMappingURL=SearchAndGeocodeTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchAndGeocodeTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/search-and-geocode-tool/SearchAndGeocodeTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG9D,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2F/B,CAAC;AAEH,qBAAa,oBAAqB,SAAQ,kBAAkB,CAC1D,OAAO,2BAA2B,CACnC;IAKa,OAAO,CAAC,SAAS;IAJ7B,IAAI,SAA6B;IACjC,WAAW,SAC0Q;gBAEjQ,SAAS,GAAE,OAAO,KAAmB;IAIzD,OAAO,CAAC,mBAAmB;cAsDX,OAAO,CACrB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,EAClD,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAqG3C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SearchAndGeocodeTool = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const MapboxApiBasedTool_js_1 = require("../MapboxApiBasedTool.js");
|
|
6
6
|
const fetchRequest_js_1 = require("../../utils/fetchRequest.js");
|
|
7
|
-
const
|
|
7
|
+
const SearchAndGeocodeInputSchema = zod_1.z.object({
|
|
8
8
|
q: zod_1.z
|
|
9
9
|
.string()
|
|
10
10
|
.max(256)
|
|
@@ -13,13 +13,6 @@ const PoiSearchInputSchema = zod_1.z.object({
|
|
|
13
13
|
.string()
|
|
14
14
|
.optional()
|
|
15
15
|
.describe('ISO language code for the response (e.g., "en", "es", "fr", "de", "ja")'),
|
|
16
|
-
limit: zod_1.z
|
|
17
|
-
.number()
|
|
18
|
-
.min(1)
|
|
19
|
-
.max(10)
|
|
20
|
-
.optional()
|
|
21
|
-
.default(10)
|
|
22
|
-
.describe('Maximum number of results to return (1-10)'),
|
|
23
16
|
proximity: zod_1.z
|
|
24
17
|
.union([
|
|
25
18
|
zod_1.z.object({
|
|
@@ -31,21 +24,6 @@ const PoiSearchInputSchema = zod_1.z.object({
|
|
|
31
24
|
if (val === 'ip') {
|
|
32
25
|
return 'ip';
|
|
33
26
|
}
|
|
34
|
-
// Handle JSON-stringified object: "{\"longitude\": -82.458107, \"latitude\": 27.937259}"
|
|
35
|
-
if (val.startsWith('{') && val.endsWith('}')) {
|
|
36
|
-
try {
|
|
37
|
-
const parsed = JSON.parse(val);
|
|
38
|
-
if (typeof parsed === 'object' &&
|
|
39
|
-
parsed !== null &&
|
|
40
|
-
typeof parsed.longitude === 'number' &&
|
|
41
|
-
typeof parsed.latitude === 'number') {
|
|
42
|
-
return { longitude: parsed.longitude, latitude: parsed.latitude };
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
// Fall back to other formats
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
27
|
// Handle string that looks like an array: "[-82.451668, 27.942964]"
|
|
50
28
|
if (val.startsWith('[') && val.endsWith(']')) {
|
|
51
29
|
const coords = val
|
|
@@ -53,19 +31,19 @@ const PoiSearchInputSchema = zod_1.z.object({
|
|
|
53
31
|
.split(',')
|
|
54
32
|
.map((s) => Number(s.trim()));
|
|
55
33
|
if (coords.length === 2 && !isNaN(coords[0]) && !isNaN(coords[1])) {
|
|
56
|
-
return
|
|
34
|
+
return coords;
|
|
57
35
|
}
|
|
58
36
|
}
|
|
59
37
|
// Handle comma-separated string: "-82.451668,27.942964"
|
|
60
38
|
const parts = val.split(',').map((s) => Number(s.trim()));
|
|
61
39
|
if (parts.length === 2 && !isNaN(parts[0]) && !isNaN(parts[1])) {
|
|
62
|
-
return
|
|
40
|
+
return parts;
|
|
63
41
|
}
|
|
64
|
-
throw new Error('Invalid proximity format. Expected
|
|
42
|
+
throw new Error('Invalid proximity format. Expected [longitude, latitude], "longitude,latitude", or "ip"');
|
|
65
43
|
})
|
|
66
44
|
])
|
|
67
45
|
.optional()
|
|
68
|
-
.describe('Location to bias results towards. Either
|
|
46
|
+
.describe('Location to bias results towards. Either [longitude, latitude] or "ip" for IP-based location. STRONGLY ENCOURAGED for relevant results.'),
|
|
69
47
|
bbox: zod_1.z
|
|
70
48
|
.object({
|
|
71
49
|
minLongitude: zod_1.z.number().min(-180).max(180),
|
|
@@ -74,7 +52,7 @@ const PoiSearchInputSchema = zod_1.z.object({
|
|
|
74
52
|
maxLatitude: zod_1.z.number().min(-90).max(90)
|
|
75
53
|
})
|
|
76
54
|
.optional()
|
|
77
|
-
.describe('Bounding box to limit results within
|
|
55
|
+
.describe('Bounding box to limit results within [minLon, minLat, maxLon, maxLat]'),
|
|
78
56
|
country: zod_1.z
|
|
79
57
|
.array(zod_1.z.string().length(2))
|
|
80
58
|
.optional()
|
|
@@ -105,20 +83,14 @@ const PoiSearchInputSchema = zod_1.z.object({
|
|
|
105
83
|
latitude: zod_1.z.number().min(-90).max(90)
|
|
106
84
|
})
|
|
107
85
|
.optional()
|
|
108
|
-
.describe('Starting point for ETA calculations as coordinate object with longitude and latitude'),
|
|
109
|
-
format: zod_1.z
|
|
110
|
-
.enum(['json_string', 'formatted_text'])
|
|
111
|
-
.optional()
|
|
112
|
-
.default('formatted_text')
|
|
113
|
-
.describe('Output format: "json_string" returns raw GeoJSON data as a JSON string that can be parsed; "formatted_text" returns human-readable text with place names, addresses, and coordinates. Both return as text content but json_string contains parseable JSON data while formatted_text is for display.')
|
|
114
86
|
});
|
|
115
|
-
class
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
constructor(
|
|
120
|
-
super({ inputSchema:
|
|
121
|
-
this.
|
|
87
|
+
class SearchAndGeocodeTool extends MapboxApiBasedTool_js_1.MapboxApiBasedTool {
|
|
88
|
+
fetchImpl;
|
|
89
|
+
name = 'search_and_geocode_tool';
|
|
90
|
+
description = "Search for POIs, brands, chains, geocode cities, towns, addresses. Do not use for generic place types such as 'museums', 'coffee shops', 'tacos', etc, because category_search_tool is better for that. Setting a proximity point is strongly encouraged for more local results.";
|
|
91
|
+
constructor(fetchImpl = fetchRequest_js_1.fetchClient) {
|
|
92
|
+
super({ inputSchema: SearchAndGeocodeInputSchema });
|
|
93
|
+
this.fetchImpl = fetchImpl;
|
|
122
94
|
}
|
|
123
95
|
formatGeoJsonToText(geoJsonResponse) {
|
|
124
96
|
if (!geoJsonResponse ||
|
|
@@ -163,7 +135,7 @@ class PoiSearchTool extends MapboxApiBasedTool_js_1.MapboxApiBasedTool {
|
|
|
163
135
|
return results.join('\n\n');
|
|
164
136
|
}
|
|
165
137
|
async execute(input, accessToken) {
|
|
166
|
-
this.log('info', `
|
|
138
|
+
this.log('info', `SearchAndGeocodeTool: Starting search with input: ${JSON.stringify(input)}`);
|
|
167
139
|
const url = new URL(`${MapboxApiBasedTool_js_1.MapboxApiBasedTool.mapboxApiEndpoint}search/searchbox/v1/forward`);
|
|
168
140
|
// Required parameters
|
|
169
141
|
url.searchParams.append('q', input.q);
|
|
@@ -172,21 +144,23 @@ class PoiSearchTool extends MapboxApiBasedTool_js_1.MapboxApiBasedTool {
|
|
|
172
144
|
if (input.language) {
|
|
173
145
|
url.searchParams.append('language', input.language);
|
|
174
146
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
147
|
+
// Hard code limit to 10
|
|
148
|
+
url.searchParams.append('limit', '10');
|
|
178
149
|
if (input.proximity) {
|
|
179
150
|
if (input.proximity === 'ip') {
|
|
180
151
|
url.searchParams.append('proximity', 'ip');
|
|
181
152
|
}
|
|
153
|
+
else if (Array.isArray(input.proximity)) {
|
|
154
|
+
const [lng, lat] = input.proximity;
|
|
155
|
+
url.searchParams.append('proximity', `${lng},${lat}`);
|
|
156
|
+
}
|
|
182
157
|
else {
|
|
183
|
-
|
|
184
|
-
url.searchParams.append('proximity', `${longitude},${latitude}`);
|
|
158
|
+
// Object format with longitude/latitude properties
|
|
159
|
+
url.searchParams.append('proximity', `${input.proximity.longitude},${input.proximity.latitude}`);
|
|
185
160
|
}
|
|
186
161
|
}
|
|
187
162
|
if (input.bbox) {
|
|
188
|
-
|
|
189
|
-
url.searchParams.append('bbox', `${minLongitude},${minLatitude},${maxLongitude},${maxLatitude}`);
|
|
163
|
+
url.searchParams.append('bbox', `${input.bbox.minLongitude},${input.bbox.minLatitude},${input.bbox.maxLongitude},${input.bbox.maxLatitude}`);
|
|
190
164
|
}
|
|
191
165
|
if (input.country && input.country.length > 0) {
|
|
192
166
|
url.searchParams.append('country', input.country.join(','));
|
|
@@ -207,25 +181,19 @@ class PoiSearchTool extends MapboxApiBasedTool_js_1.MapboxApiBasedTool {
|
|
|
207
181
|
url.searchParams.append('navigation_profile', input.navigation_profile);
|
|
208
182
|
}
|
|
209
183
|
if (input.origin) {
|
|
210
|
-
|
|
211
|
-
url.searchParams.append('origin', `${longitude},${latitude}`);
|
|
184
|
+
url.searchParams.append('origin', `${input.origin.longitude},${input.origin.latitude}`);
|
|
212
185
|
}
|
|
213
|
-
this.log('info', `
|
|
214
|
-
const response = await this.
|
|
186
|
+
this.log('info', `SearchAndGeocodeTool: Fetching from URL: ${url.toString().replace(accessToken, '[REDACTED]')}`);
|
|
187
|
+
const response = await this.fetchImpl(url.toString());
|
|
215
188
|
if (!response.ok) {
|
|
216
189
|
const errorBody = await response.text();
|
|
217
|
-
this.log('error', `
|
|
190
|
+
this.log('error', `SearchAndGeocodeTool: API Error - Status: ${response.status}, Body: ${errorBody}`);
|
|
218
191
|
throw new Error(`Failed to search: ${response.status} ${response.statusText}`);
|
|
219
192
|
}
|
|
220
193
|
const data = await response.json();
|
|
221
|
-
this.log('info', `
|
|
222
|
-
|
|
223
|
-
return { type: 'text', text: JSON.stringify(data, null, 2) };
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
return { type: 'text', text: this.formatGeoJsonToText(data) };
|
|
227
|
-
}
|
|
194
|
+
this.log('info', `SearchAndGeocodeTool: Successfully completed search, found ${data.features?.length || 0} results`);
|
|
195
|
+
return { type: 'text', text: this.formatGeoJsonToText(data) };
|
|
228
196
|
}
|
|
229
197
|
}
|
|
230
|
-
exports.
|
|
231
|
-
//# sourceMappingURL=
|
|
198
|
+
exports.SearchAndGeocodeTool = SearchAndGeocodeTool;
|
|
199
|
+
//# sourceMappingURL=SearchAndGeocodeTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchAndGeocodeTool.js","sourceRoot":"","sources":["../../../../src/tools/search-and-geocode-tool/SearchA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O,EACP,6CAA6C,QAAQ,CAAC,MAAM,WAAW,SAAS,EAAE,CACnF,CAAC;YACF,MAAM,IAAI,KAAK,CACb,qBAAqB,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAC9D,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,GAAG,CACN,MAAM,EACN,8DAA+D,IAAY,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,UAAU,CAC5G,CAAC;QAEF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;IAChE,CAAC;CACF;AAzKD,oDAyKC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { CategoryListTool } from './category-list-tool/CategoryListTool.js';
|
|
2
2
|
import { CategorySearchTool } from './category-search-tool/CategorySearchTool.js';
|
|
3
3
|
import { DirectionsTool } from './directions-tool/DirectionsTool.js';
|
|
4
|
-
import { ForwardGeocodeTool } from './forward-geocode-tool/ForwardGeocodeTool.js';
|
|
5
4
|
import { IsochroneTool } from './isochrone-tool/IsochroneTool.js';
|
|
6
5
|
import { MatrixTool } from './matrix-tool/MatrixTool.js';
|
|
7
|
-
import { PoiSearchTool } from './poi-search-tool/PoiSearchTool.js';
|
|
8
6
|
import { ReverseGeocodeTool } from './reverse-geocode-tool/ReverseGeocodeTool.js';
|
|
9
7
|
import { StaticMapImageTool } from './static-map-image-tool/StaticMapImageTool.js';
|
|
8
|
+
import { SearchAndGeocodeTool } from './search-and-geocode-tool/SearchAndGeocodeTool.js';
|
|
10
9
|
import { VersionTool } from './version-tool/VersionTool.js';
|
|
11
|
-
export declare const ALL_TOOLS: readonly [VersionTool, CategoryListTool, CategorySearchTool, DirectionsTool,
|
|
10
|
+
export declare const ALL_TOOLS: readonly [VersionTool, CategoryListTool, CategorySearchTool, DirectionsTool, IsochroneTool, MatrixTool, ReverseGeocodeTool, StaticMapImageTool, SearchAndGeocodeTool];
|
|
12
11
|
export type ToolInstance = (typeof ALL_TOOLS)[number];
|
|
13
12
|
export declare function getAllTools(): readonly ToolInstance[];
|
|
14
13
|
export declare function getToolByName(name: string): ToolInstance | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolRegistry.d.ts","sourceRoot":"","sources":["../../../src/tools/toolRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"toolRegistry.d.ts","sourceRoot":"","sources":["../../../src/tools/toolRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAG5D,eAAO,MAAM,SAAS,uKAWZ,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,wBAAgB,WAAW,IAAI,SAAS,YAAY,EAAE,CAErD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEpE"}
|
|
@@ -7,12 +7,11 @@ exports.getToolByName = getToolByName;
|
|
|
7
7
|
const CategoryListTool_js_1 = require("./category-list-tool/CategoryListTool.js");
|
|
8
8
|
const CategorySearchTool_js_1 = require("./category-search-tool/CategorySearchTool.js");
|
|
9
9
|
const DirectionsTool_js_1 = require("./directions-tool/DirectionsTool.js");
|
|
10
|
-
const ForwardGeocodeTool_js_1 = require("./forward-geocode-tool/ForwardGeocodeTool.js");
|
|
11
10
|
const IsochroneTool_js_1 = require("./isochrone-tool/IsochroneTool.js");
|
|
12
11
|
const MatrixTool_js_1 = require("./matrix-tool/MatrixTool.js");
|
|
13
|
-
const PoiSearchTool_js_1 = require("./poi-search-tool/PoiSearchTool.js");
|
|
14
12
|
const ReverseGeocodeTool_js_1 = require("./reverse-geocode-tool/ReverseGeocodeTool.js");
|
|
15
13
|
const StaticMapImageTool_js_1 = require("./static-map-image-tool/StaticMapImageTool.js");
|
|
14
|
+
const SearchAndGeocodeTool_js_1 = require("./search-and-geocode-tool/SearchAndGeocodeTool.js");
|
|
16
15
|
const VersionTool_js_1 = require("./version-tool/VersionTool.js");
|
|
17
16
|
// Central registry of all tools
|
|
18
17
|
exports.ALL_TOOLS = [
|
|
@@ -21,12 +20,11 @@ exports.ALL_TOOLS = [
|
|
|
21
20
|
new CategoryListTool_js_1.CategoryListTool(),
|
|
22
21
|
new CategorySearchTool_js_1.CategorySearchTool(),
|
|
23
22
|
new DirectionsTool_js_1.DirectionsTool(),
|
|
24
|
-
new ForwardGeocodeTool_js_1.ForwardGeocodeTool(),
|
|
25
23
|
new IsochroneTool_js_1.IsochroneTool(),
|
|
26
24
|
new MatrixTool_js_1.MatrixTool(),
|
|
27
|
-
new PoiSearchTool_js_1.PoiSearchTool(),
|
|
28
25
|
new ReverseGeocodeTool_js_1.ReverseGeocodeTool(),
|
|
29
|
-
new StaticMapImageTool_js_1.StaticMapImageTool()
|
|
26
|
+
new StaticMapImageTool_js_1.StaticMapImageTool(),
|
|
27
|
+
new SearchAndGeocodeTool_js_1.SearchAndGeocodeTool()
|
|
30
28
|
];
|
|
31
29
|
function getAllTools() {
|
|
32
30
|
return exports.ALL_TOOLS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolRegistry.js","sourceRoot":"","sources":["../../../src/tools/toolRegistry.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"toolRegistry.js","sourceRoot":"","sources":["../../../src/tools/toolRegistry.ts"],"names":[],"mappings":";;;AA2BA,kCAEC;AAED,sCAEC;AAjCD,8BAA8B;AAC9B,kFAA4E;AAC5E,wFAAkF;AAClF,2EAAqE;AACrE,wEAAkE;AAClE,+DAAyD;AACzD,wFAAkF;AAClF,yFAAmF;AACnF,+FAAyF;AACzF,kEAA4D;AAE5D,gCAAgC;AACnB,QAAA,SAAS,GAAG;IACvB,gCAAgC;IAChC,IAAI,4BAAW,EAAE;IACjB,IAAI,sCAAgB,EAAE;IACtB,IAAI,0CAAkB,EAAE;IACxB,IAAI,kCAAc,EAAE;IACpB,IAAI,gCAAa,EAAE;IACnB,IAAI,0BAAU,EAAE;IAChB,IAAI,0CAAkB,EAAE;IACxB,IAAI,0CAAkB,EAAE;IACxB,IAAI,8CAAoB,EAAE;CAClB,CAAC;AAIX,SAAgB,WAAW;IACzB,OAAO,iBAAS,CAAC;AACnB,CAAC;AAED,SAAgB,aAAa,CAAC,IAAY;IACxC,OAAO,iBAAS,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MapboxApiBasedTool } from '../MapboxApiBasedTool.js';
|
|
3
|
-
declare const
|
|
3
|
+
declare const SearchAndGeocodeInputSchema: z.ZodObject<{
|
|
4
4
|
q: z.ZodString;
|
|
5
5
|
language: z.ZodOptional<z.ZodString>;
|
|
6
|
-
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
7
6
|
proximity: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
8
7
|
longitude: z.ZodNumber;
|
|
9
8
|
latitude: z.ZodNumber;
|
|
@@ -13,10 +12,7 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
13
12
|
}, {
|
|
14
13
|
longitude: number;
|
|
15
14
|
latitude: number;
|
|
16
|
-
}>, z.ZodEffects<z.ZodString, "ip" |
|
|
17
|
-
longitude: any;
|
|
18
|
-
latitude: any;
|
|
19
|
-
}, string>]>>;
|
|
15
|
+
}>, z.ZodEffects<z.ZodString, "ip" | [number, number], string>]>>;
|
|
20
16
|
bbox: z.ZodOptional<z.ZodObject<{
|
|
21
17
|
minLongitude: z.ZodNumber;
|
|
22
18
|
minLatitude: z.ZodNumber;
|
|
@@ -49,19 +45,13 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
49
45
|
longitude: number;
|
|
50
46
|
latitude: number;
|
|
51
47
|
}>>;
|
|
52
|
-
format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["json_string", "formatted_text"]>>>;
|
|
53
48
|
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
limit: number;
|
|
55
|
-
format: "json_string" | "formatted_text";
|
|
56
49
|
q: string;
|
|
57
50
|
language?: string | undefined;
|
|
58
51
|
proximity?: "ip" | {
|
|
59
52
|
longitude: number;
|
|
60
53
|
latitude: number;
|
|
61
|
-
} |
|
|
62
|
-
longitude: any;
|
|
63
|
-
latitude: any;
|
|
64
|
-
} | undefined;
|
|
54
|
+
} | [number, number] | undefined;
|
|
65
55
|
bbox?: {
|
|
66
56
|
minLongitude: number;
|
|
67
57
|
minLatitude: number;
|
|
@@ -81,7 +71,6 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
81
71
|
}, {
|
|
82
72
|
q: string;
|
|
83
73
|
language?: string | undefined;
|
|
84
|
-
limit?: number | undefined;
|
|
85
74
|
proximity?: string | {
|
|
86
75
|
longitude: number;
|
|
87
76
|
latitude: number;
|
|
@@ -93,7 +82,6 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
93
82
|
maxLatitude: number;
|
|
94
83
|
} | undefined;
|
|
95
84
|
country?: string[] | undefined;
|
|
96
|
-
format?: "json_string" | "formatted_text" | undefined;
|
|
97
85
|
types?: string[] | undefined;
|
|
98
86
|
poi_category?: string[] | undefined;
|
|
99
87
|
auto_complete?: boolean | undefined;
|
|
@@ -104,16 +92,16 @@ declare const PoiSearchInputSchema: z.ZodObject<{
|
|
|
104
92
|
latitude: number;
|
|
105
93
|
} | undefined;
|
|
106
94
|
}>;
|
|
107
|
-
export declare class
|
|
95
|
+
export declare class SearchAndGeocodeTool extends MapboxApiBasedTool<typeof SearchAndGeocodeInputSchema> {
|
|
96
|
+
private fetchImpl;
|
|
108
97
|
name: string;
|
|
109
98
|
description: string;
|
|
110
|
-
|
|
111
|
-
constructor(fetch?: typeof globalThis.fetch);
|
|
99
|
+
constructor(fetchImpl?: typeof fetch);
|
|
112
100
|
private formatGeoJsonToText;
|
|
113
|
-
protected execute(input: z.infer<typeof
|
|
101
|
+
protected execute(input: z.infer<typeof SearchAndGeocodeInputSchema>, accessToken: string): Promise<{
|
|
114
102
|
type: 'text';
|
|
115
103
|
text: string;
|
|
116
104
|
}>;
|
|
117
105
|
}
|
|
118
106
|
export {};
|
|
119
|
-
//# sourceMappingURL=
|
|
107
|
+
//# sourceMappingURL=SearchAndGeocodeTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchAndGeocodeTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/search-and-geocode-tool/SearchAndGeocodeTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG9D,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2F/B,CAAC;AAEH,qBAAa,oBAAqB,SAAQ,kBAAkB,CAC1D,OAAO,2BAA2B,CACnC;IAKa,OAAO,CAAC,SAAS;IAJ7B,IAAI,SAA6B;IACjC,WAAW,SAC0Q;gBAEjQ,SAAS,GAAE,OAAO,KAAmB;IAIzD,OAAO,CAAC,mBAAmB;cAsDX,OAAO,CACrB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,EAClD,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAqG3C"}
|