phone_lookup
Look up phone numbers to identify associated information and potential risks using open-source intelligence services.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes | Phone number to lookup (include country code) |
Implementation Reference
- src/index.ts:584-593 (handler)Registration and handler registration for phone_lookup tool.
server.tool( "phone_lookup", { number: z.string().describe("Phone number to lookup (include country code)") }, async ({ number }) => { const result = await phoneClient.lookup(number); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } ); - src/tools/phone.ts:12-33 (handler)Actual implementation of the phone lookup logic within the PhoneApiClient class.
async lookup(number: string): Promise<any> { const apiKey = process.env.ABSTRACT_PHONE_API_KEY; if (!apiKey) { // Fallback to basic formatting if no key return { number, message: "Configure ABSTRACT_PHONE_API_KEY for full carrier/location data", basicFormat: true }; } try { return await this.fetch<any>("", { method: "GET", }, { api_key: apiKey, phone: number, }); } catch (error) { throw new McpError(ErrorCode.InternalError, `Phone Lookup error: ${(error as Error).message}`); } }