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
| Name | Required | Description | Default |
|---|---|---|---|
| ticketId | Yes | The ticket ID to add the note to | |
| title | No | Note title | |
| description | Yes | Note content | |
| noteType | No | Note type (1=General, 2=Appointment, 3=Task, 4=Ticket, 5=Project, 6=Opportunity) | |
| publish | No | Publish 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; } }
- src/handlers/tool.handler.ts:1184-1192 (handler)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;
- src/handlers/tool.handler.ts:523-551 (registration)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'] } },
- src/handlers/tool.handler.ts:523-551 (schema)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'] } },