Skip to main content
Glama

create_contact

Add new contacts to Autotask by providing company ID, name, and contact details to maintain accurate client records.

Instructions

Create a new contact in Autotask

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIDYesCompany ID for the contact
firstNameYesContact first name
lastNameYesContact last name
emailAddressNoContact email address
phoneNoContact phone number
titleNoContact job title

Implementation Reference

  • Core implementation of the create_contact tool. Calls the autotask-node client to create a new contact via the Autotask API and returns the new contact ID.
    async createContact(contact: Partial<AutotaskContact>): Promise<number> { const client = await this.ensureClient(); try { this.logger.debug('Creating contact:', contact); const result = await client.contacts.create(contact as any); const contactId = (result.data as any)?.id; this.logger.info(`Contact created with ID: ${contactId}`); return contactId; } catch (error) { this.logger.error('Failed to create contact:', error); throw error; } }
  • Input schema definition and tool metadata (name, description) for the create_contact tool, returned by listTools().
    { name: 'create_contact', description: 'Create a new contact in Autotask', inputSchema: { type: 'object', properties: { companyID: { type: 'number', description: 'Company ID for the contact' }, firstName: { type: 'string', description: 'Contact first name' }, lastName: { type: 'string', description: 'Contact last name' }, emailAddress: { type: 'string', description: 'Contact email address' }, phone: { type: 'string', description: 'Contact phone number' }, title: { type: 'string', description: 'Contact job title' } }, required: ['companyID', 'firstName', 'lastName'] } },
  • Dispatch handler in callTool method that routes create_contact calls to the AutotaskService.createContact method.
    case 'create_contact': result = await this.autotaskService.createContact(args); message = `Successfully created contact with ID: ${result}`; break;
  • MCP server registration of the listTools endpoint, which exposes the create_contact tool to MCP clients.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { try { this.logger.debug('Handling list tools request'); const tools = await this.toolHandler.listTools(); return { tools }; } catch (error) {

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/asachs01/autotask-mcp'

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