hubspot_create_contact
Create new contacts in HubSpot CRM by providing email address and contact details to build your customer database and manage relationships.
Instructions
Create a new contact in HubSpot
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| properties | Yes | Contact properties |
Implementation Reference
- index.ts:1520-1529 (handler)MCP tool handler that validates input, calls HubSpotClient.createContact, and returns the JSON response.case "hubspot_create_contact": { const args = request.params.arguments as unknown as CreateContactArgs; if (!args.properties || !args.properties.email) { throw new Error("Missing required arguments: properties including email"); } const response = await hubspotClient.createContact(args.properties); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
- index.ts:174-203 (schema)Tool definition with input schema requiring 'properties' object containing at least 'email', used for validation and documentation.const createContactTool: Tool = { name: "hubspot_create_contact", description: "Create a new contact in HubSpot", inputSchema: { type: "object", properties: { properties: { type: "object", properties: { email: { type: "string", description: "Contact's email address", }, firstname: { type: "string", description: "Contact's first name", }, lastname: { type: "string", description: "Contact's last name", }, }, required: ["email"], additionalProperties: true, description: "Contact properties", }, }, required: ["properties"], }, };
- index.ts:603-608 (helper)Core helper method in HubSpotClient that wraps the HubSpot API call to crm.contacts.basicApi.create.async createContact(properties: { [key: string]: any }): Promise<any> { const contactInput = { properties, }; return await this.client.crm.contacts.basicApi.create(contactInput); }
- index.ts:1707-1725 (registration)Registration of the tool in the listTools handler by including createContactTool in the returned tools array.tools: [ searchContactsTool, getContactTool, createContactTool, updateContactTool, listDealsTool, getDealTool, createDealTool, updateDealTool, listCompaniesTool, getCompanyTool, getSalesAnalyticsTool, getDealHistoryTool, getDealNotesTool, getEngagementsByDealTool, getSalesPerformanceTool, getPipelineAnalyticsTool, getForecastAnalyticsTool, ],
- index.ts:70-77 (schema)TypeScript interface defining the expected arguments for the create contact tool.interface CreateContactArgs { properties: { email: string; firstname?: string; lastname?: string; [key: string]: any; }; }