UNPKG

@rockship/apollo-io-mcp

Version:

A powerful Model Context Protocol (MCP) server implementation for seamless Apollo.io API integration, enabling AI assistants to interact with Apollo.io data

28 lines 1.13 kB
import { z } from "zod"; import { ErrorHandlerService } from "../services/error-handler.service.js"; export class ContactsSearchTool { apolloClient; name = "contacts_search"; title = "Contacts Search"; description = "Use the Contacts Search endpoint to find contact cards based on keywords. Keywords can include combinations of names, job titles, employers (company names), and email addresses."; schema = { q_keywords: z .string() .describe("Free text keywords to search (e.g. senior research analyst, microsoft)"), page: z.number().describe("Page number").optional(), per_page: z.number().describe("Results per page").optional(), }; constructor(apolloClient) { this.apolloClient = apolloClient; } async handler(args) { try { const data = await this.apolloClient.contactSearch(args); return ErrorHandlerService.createSuccessResponse(data); } catch (error) { return ErrorHandlerService.handleToolError(error); } } } //# sourceMappingURL=contacts-search.tool.js.map