hubspot_get_contact
Retrieve specific contact details from HubSpot CRM using a contact ID to access customer information and properties for sales analysis.
Instructions
Get a specific contact by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contactId | Yes | The ID of the contact to retrieve | |
| properties | No | List of properties to include in the results |
Implementation Reference
- index.ts:599-601 (handler)Core implementation of the tool logic: retrieves a specific contact by ID from HubSpot CRM using the API client.async getContact(contactId: string, properties?: string[]): Promise<any> { return await this.client.crm.contacts.basicApi.getById(contactId, properties || ["email", "firstname", "lastname", "phone"]); }
- index.ts:152-172 (schema)Tool definition including name, description, and input schema validation for 'hubspot_get_contact'.const getContactTool: Tool = { name: "hubspot_get_contact", description: "Get a specific contact by ID", inputSchema: { type: "object", properties: { contactId: { type: "string", description: "The ID of the contact to retrieve", }, properties: { type: "array", items: { type: "string", }, description: "List of properties to include in the results", }, }, required: ["contactId"], }, };
- index.ts:1509-1518 (handler)Request handler case that parses arguments, validates input, calls the core getContact method, and formats the response for MCP.case "hubspot_get_contact": { const args = request.params.arguments as unknown as GetContactArgs; if (!args.contactId) { throw new Error("Missing required argument: contactId"); } const response = await hubspotClient.getContact(args.contactId, args.properties); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
- index.ts:1706-1727 (registration)Registers the 'hubspot_get_contact' tool (as getContactTool) in the list returned by ListToolsRequest handler.return { tools: [ searchContactsTool, getContactTool, createContactTool, updateContactTool, listDealsTool, getDealTool, createDealTool, updateDealTool, listCompaniesTool, getCompanyTool, getSalesAnalyticsTool, getDealHistoryTool, getDealNotesTool, getEngagementsByDealTool, getSalesPerformanceTool, getPipelineAnalyticsTool, getForecastAnalyticsTool, ], }; });
- index.ts:65-68 (schema)TypeScript interface defining the expected input arguments for the hubspot_get_contact tool.interface GetContactArgs { contactId: string; properties?: string[]; }