Skip to main content
Glama

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
NameRequiredDescriptionDefault
propertiesYesContact properties

Implementation Reference

  • 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) }], }; }
  • 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"], }, };
  • 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, ],
  • TypeScript interface defining the expected arguments for the create contact tool.
    interface CreateContactArgs { properties: { email: string; firstname?: string; lastname?: string; [key: string]: any; }; }

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/scopiousdigital/hubspot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server