Skip to main content
Glama
asachs01

Autotask MCP Server

create_company

Add new client companies to Autotask PSA with essential details like name, type, contact information, and owner assignment for streamlined customer management.

Instructions

Create a new company in Autotask

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyNameYesCompany name
companyTypeYesCompany type ID
phoneNoCompany phone number
address1NoCompany address line 1
cityNoCompany city
stateNoCompany state/province
postalCodeNoCompany postal/ZIP code
ownerResourceIDNoOwner resource ID
isActiveNoWhether the company is active

Implementation Reference

  • Core handler implementation that executes the company creation by calling the Autotask API client.accounts.create() method.
    async createCompany(company: Partial<AutotaskCompany>): Promise<number> {
      const client = await this.ensureClient();
      
      try {
        this.logger.debug('Creating company:', company);
        const result = await client.accounts.create(company as any);
        const companyId = (result.data as any)?.id;
        this.logger.info(`Company created with ID: ${companyId}`);
        return companyId;
      } catch (error) {
        this.logger.error('Failed to create company:', error);
        throw error;
      }
    }
  • MCP tool dispatcher that handles 'create_company' tool calls by delegating to AutotaskService.createCompany().
    case 'create_company':
      result = await this.autotaskService.createCompany(args);
      message = `Successfully created company with ID: ${result}`;
      break;
  • Tool schema definition including inputSchema, properties, required fields, and description. Returned by listTools() for MCP tool registration.
    {
      name: 'create_company',
      description: 'Create a new company in Autotask',
      inputSchema: {
        type: 'object',
        properties: {
          companyName: {
            type: 'string',
            description: 'Company name'
          },
          companyType: {
            type: 'number',
            description: 'Company type ID'
          },
          phone: {
            type: 'string',
            description: 'Company phone number'
          },
          address1: {
            type: 'string',
            description: 'Company address line 1'
          },
          city: {
            type: 'string',
            description: 'Company city'
          },
          state: {
            type: 'string',
            description: 'Company state/province'
          },
          postalCode: {
            type: 'string',
            description: 'Company postal/ZIP code'
          },
          ownerResourceID: {
            type: 'number',
            description: 'Owner resource ID'
          },
          isActive: {
            type: 'boolean',
            description: 'Whether the company is active'
          }
        },
        required: ['companyName', 'companyType']
      }
    },
  • MCP server registration of the listTools handler which exposes the create_company tool schema.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      try {
        this.logger.debug('Handling list tools request');
        const tools = await this.toolHandler.listTools();
        return { tools };
      } catch (error) {
        this.logger.error('Failed to list tools:', error);
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to list tools: ${error instanceof Error ? error.message : 'Unknown 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