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 |
|---|---|---|---|
| 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) | |
| ticketId | Yes | The ticket ID to add the note to | |
| title | No | Note title |
Implementation Reference
- Core handler implementation that creates the ticket note via the Autotask API client.notes.createasync 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:523-550 (schema)JSON schema definition and tool metadata used for MCP tool registrationname: '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:484-551 (registration)Tool registration within the listTools() method that returns all available MCP tools{ name: 'get_ticket_note', description: 'Get a specific ticket note by ticket ID and note ID', inputSchema: { type: 'object', properties: { ticketId: { type: 'number', description: 'The ticket ID' }, noteId: { type: 'number', description: 'The note ID to retrieve' } }, required: ['ticketId', 'noteId'] } }, { name: 'search_ticket_notes', description: 'Search for notes on a specific ticket', inputSchema: { type: 'object', properties: { ticketId: { type: 'number', description: 'The ticket ID to search notes for' }, pageSize: { type: 'number', description: 'Number of results to return (default: 25, max: 100)', minimum: 1, maximum: 100 } }, required: ['ticketId'] } }, { 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:1184-1192 (handler)MCP tool handler dispatch case in callTool() method that invokes the servicecase '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/mcp/server.ts:56-56 (registration)Instantiation of the tool handler in MCP server constructor for tool registration in the MCP protocol serverthis.toolHandler = new EnhancedAutotaskToolHandler(this.autotaskService, logger);