Skip to main content
Glama

search_place_by_number

Find business names and addresses using phone numbers in E.164 format to identify locations through telephony data.

Instructions

Find place name and address by phone number

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesPhone number in E.164 format. Ex: +1234567890

Implementation Reference

  • Handler implementation for the 'search_place_by_number' tool. Extracts the phone number from the request arguments and performs a GET request to the Voyp API endpoint constructed as API_CONFIG.ENDPOINTS.PLACE_NUMBER + number (i.e., 'place/' + number). Returns the JSON-stringified response data or an error message if the API call fails.
    } else if (request.params.name === "search_place_by_number") {
    
        const number = request.params.arguments?.number;
    
        try {
            const response = await this.axiosInstance.get<StartCallResponse>(API_CONFIG.ENDPOINTS.PLACE_NUMBER + number);
    
            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;
        }
  • Schema definition for the 'search_place_by_number' tool, provided in the ListTools response. Specifies the tool name, description, and input schema requiring a single 'number' string parameter in E.164 format.
    {
        name: "search_place_by_number",
        description: "Find place name and address by phone number",
        inputSchema: {
            type: "object",
            properties: {
                number: {
                    type: "string",
                    description: "Phone number in E.164 format. Ex: +1234567890"
                }
            },
            required: ["number"]
        }
    },
  • src/index.ts:316-536 (registration)
    The CallToolRequestHandler registration includes the dispatch logic (if-else chain) that routes to the specific handler for 'search_place_by_number' based on request.params.name.
    this.server.setRequestHandler(
        CallToolRequestSchema,
        async (request) => {
            if (request.params.name === "hangup_call") {
                if (typeof (request.params.arguments?.id) !== 'string') {
                    throw new McpError(
                        ErrorCode.InvalidParams,
                        "Invalid hangup arguments"
                    );
                }
    
                const id : string = request.params.arguments?.id as string;
    
                try {
                    const response = await this.axiosInstance.post<HangupCallResponse>(API_CONFIG.ENDPOINTS.HANGUP, { id: id});
                    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;
                }
            } else if (request.params.name === "start_call") {
    
                // if (!isValidForecastArgs(request.params.arguments)) {
                //     throw new McpError(
                //         ErrorCode.InvalidParams,
                //         "Invalid forecast arguments"
                //     );
                // }
    
                const number = request.params.arguments?.number;
                const context = request.params.arguments?.context;
                const language = request.params.arguments?.language;
    
                try {
                    const response = await this.axiosInstance.post<StartCallResponse>(API_CONFIG.ENDPOINTS.START, {
                        number,
                        context,
                        language
                    });
    
                    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;
                }
            } 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;
                }
            } else if (request.params.name === "search_place") {
    
                // if (!isValidForecastArgs(request.params.arguments)) {
                //     throw new McpError(
                //         ErrorCode.InvalidParams,
                //         "Invalid forecast arguments"
                //     );
                // }
    
                const place = request.params.arguments?.place;
                const location = request.params.arguments?.location;
    
                try {
                    const response = await this.axiosInstance.post<StartCallResponse>(API_CONFIG.ENDPOINTS.PLACE, {
                        place,
                        location
                    });
    
                    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;
                }
            } else if (request.params.name === "search_place_by_number") {
    
                const number = request.params.arguments?.number;
    
                try {
                    const response = await this.axiosInstance.get<StartCallResponse>(API_CONFIG.ENDPOINTS.PLACE_NUMBER + number);
    
                    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;
                }
            } else if (request.params.name === "get_user") {
    
                try {
                    const response = await this.axiosInstance.get<StartCallResponse>(API_CONFIG.ENDPOINTS.USER);
    
                    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;
                }
            } else if (request.params.name === "get_call") {
                const id = request.params.arguments?.id;
    
                try {
                    const response = await this.axiosInstance.get<StartCallResponse>(API_CONFIG.ENDPOINTS.CALL + id);
    
                    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;
                }
            } else {
                throw new McpError(
                    ErrorCode.MethodNotFound,
                    `Unknown tool: ${request.params.name}`
                );
            }
        }
    );
  • API endpoint configuration used by the handler: API_CONFIG.ENDPOINTS.PLACE_NUMBER = 'place/', which is concatenated with the phone number to form the full URL.
    PLACE_NUMBER: 'place/'
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'finds' information, implying a read-only operation, but doesn't clarify if it requires authentication, has rate limits, returns partial or full results, or handles errors. For a tool with no annotations, this leaves significant gaps in understanding its behavior beyond the basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Find place name and address by phone number.' It is front-loaded with the core purpose, uses clear language, and avoids unnecessary words. Every part of the sentence earns its place by conveying essential information without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple lookup with one parameter) and the lack of annotations and output schema, the description is minimally complete. It states what the tool does but doesn't cover behavioral aspects like response format, error handling, or prerequisites. For a basic search tool, this is adequate but leaves room for improvement in providing a fuller context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'number' documented as 'Phone number in E.164 format. Ex: +1234567890.' The description adds no additional meaning beyond this, as it only mentions 'phone number' without specifying format or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, indicating adequate but not enhanced parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Find place name and address by phone number.' It specifies the verb ('find') and the resources ('place name and address'), making it easy to understand what the tool does. However, it doesn't explicitly distinguish this tool from sibling tools like 'search_place' or 'search_places' (which might search by other criteria), so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'search_place' or 'search_places', nor does it specify scenarios where this tool is preferred (e.g., when you have a phone number but not other place details). Without any usage context or exclusions, it offers minimal help in tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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