search_places
Find specific places like restaurants or businesses in any location by entering a search query.
Instructions
Search places in a given location
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes | Places to search. Ex: italian restaurants in New York City, US |
Implementation Reference
- src/index.ts:387-420 (handler)Handler logic for the 'search_places' tool. Extracts the 'search' parameter from arguments, performs a POST request to the Voyp API endpoint 'places/search', and returns the JSON-stringified response or an error message.} else if (request.params.name === "search_places") { // if (!isValidForecastArgs(request.params.arguments)) { // throw new McpError( // ErrorCode.InvalidParams, // "Invalid forecast arguments" // ); // } const search = request.params.arguments?.search; try { const response = await this.axiosInstance.post<StartCallResponse>(API_CONFIG.ENDPOINTS.PLACES, { search }); return { content: [{ type: "text", text: JSON.stringify(response.data) }] }; } catch (error) { if (axios.isAxiosError(error)) { return { content: [{ type: "text", text: `Voyp API error: ${error.response?.data.message ?? error.message}` }], isError: true, } } throw error; }
- src/index.ts:243-256 (registration)Registration of the 'search_places' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema requiring a 'search' string.{ name: "search_places", description: "Search places in a given location", inputSchema: { type: "object", properties: { search: { type: "string", description: "Places to search. Ex: italian restaurants in New York City, US" } }, required: ["search"] } },
- src/index.ts:246-255 (schema)Input schema definition for the 'search_places' tool, specifying an object with a required 'search' string property.inputSchema: { type: "object", properties: { search: { type: "string", description: "Places to search. Ex: italian restaurants in New York City, US" } }, required: ["search"] }
- src/index.ts:35-35 (helper)API endpoint configuration for the places search: 'places/search'.PLACES: 'places/search',