Skip to main content
Glama
asachs01

Autotask MCP Server

create_ticket_note

Add notes to Autotask tickets to document updates, track progress, and maintain communication records for support cases.

Instructions

Create a new note for a ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketIdYesThe ticket ID to add the note to
titleNoNote title
descriptionYesNote content
noteTypeNoNote type (1=General, 2=Appointment, 3=Task, 4=Ticket, 5=Project, 6=Opportunity)
publishNoPublish level (1=Internal Only, 2=All Autotask Users, 3=Everyone)

Implementation Reference

  • Core implementation of the createTicketNote function that handles the API call to create a note on a ticket using the autotask-node client.
    async createTicketNote(ticketId: number, note: Partial<AutotaskTicketNote>): Promise<number> {
      const client = await this.ensureClient();
      
      try {
        this.logger.debug(`Creating ticket note for ticket ${ticketId}:`, note);
        const noteData = {
          ...note,
          ticketId: ticketId
        };
        const result = await client.notes.create(noteData as any);
        const noteId = (result.data as any)?.id;
        this.logger.info(`Ticket note created with ID: ${noteId}`);
        return noteId;
      } catch (error) {
        this.logger.error(`Failed to create ticket note for ticket ${ticketId}:`, error);
        throw error;
      }
    }
  • MCP tool handler switch case in callTool method that processes the create_ticket_note tool invocation by mapping arguments and calling the service layer.
    case 'create_ticket_note':
      result = await this.autotaskService.createTicketNote(args.ticketId, {
        title: args.title,
        description: args.description,
        noteType: args.noteType,
        publish: args.publish
      });
      message = `Successfully created ticket note with ID: ${result}`;
      break;
  • Tool registration object in listTools() method defining the create_ticket_note tool name, description, and input schema for MCP.
      name: 'create_ticket_note',
      description: 'Create a new note for a ticket',
      inputSchema: {
        type: 'object',
        properties: {
          ticketId: {
            type: 'number',
            description: 'The ticket ID to add the note to'
          },
          title: {
            type: 'string',
            description: 'Note title'
          },
          description: {
            type: 'string',
            description: 'Note content'
          },
          noteType: {
            type: 'number',
            description: 'Note type (1=General, 2=Appointment, 3=Task, 4=Ticket, 5=Project, 6=Opportunity)'
          },
          publish: {
            type: 'number',
            description: 'Publish level (1=Internal Only, 2=All Autotask Users, 3=Everyone)'
          }
        },
        required: ['ticketId', 'description']
      }
    },
  • Input schema (JSON Schema) for the create_ticket_note tool, defining parameters, types, descriptions, and required fields.
      name: 'create_ticket_note',
      description: 'Create a new note for a ticket',
      inputSchema: {
        type: 'object',
        properties: {
          ticketId: {
            type: 'number',
            description: 'The ticket ID to add the note to'
          },
          title: {
            type: 'string',
            description: 'Note title'
          },
          description: {
            type: 'string',
            description: 'Note content'
          },
          noteType: {
            type: 'number',
            description: 'Note type (1=General, 2=Appointment, 3=Task, 4=Ticket, 5=Project, 6=Opportunity)'
          },
          publish: {
            type: 'number',
            description: 'Publish level (1=Internal Only, 2=All Autotask Users, 3=Everyone)'
          }
        },
        required: ['ticketId', 'description']
      }
    },

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