Skip to main content
Glama

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
NameRequiredDescriptionDefault
searchYesPlaces to search. Ex: italian restaurants in New York City, US

Implementation Reference

  • 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"]
        }
    },
  • 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"]
    }
  • API endpoint configuration for the places search: 'places/search'.
    PLACES: 'places/search',

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulotaylor/voyp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server