get_ticket_note
Retrieve a specific note from an Autotask PSA ticket using ticket ID and note ID to access detailed ticket information.
Instructions
Get a specific ticket note by ticket ID and note ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticketId | Yes | The ticket ID | |
| noteId | Yes | The note ID to retrieve |
Implementation Reference
- src/handlers/tool.handler.ts:484-501 (schema)Defines the input schema, name, and description for the get_ticket_note tool used in MCP tool listing/registration{ 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'] } },
- src/handlers/tool.handler.ts:1174-1176 (handler)Handler dispatch in callTool method that invokes the service method with parsed argumentscase 'get_ticket_note': result = await this.autotaskService.getTicketNote(args.ticketId, args.noteId); message = `Ticket note retrieved successfully`;
- Core implementation: Queries the Autotask notes.list API endpoint filtered by ticketId and noteId to retrieve the specific ticket noteasync getTicketNote(ticketId: number, noteId: number): Promise<AutotaskTicketNote | null> { const client = await this.ensureClient(); try { this.logger.debug(`Getting ticket note - TicketID: ${ticketId}, NoteID: ${noteId}`); // Use generic notes endpoint with filtering const result = await client.notes.list({ filter: [ { field: 'ticketId', op: 'eq', value: ticketId }, { field: 'id', op: 'eq', value: noteId } ] }); const notes = (result.data as any[]) || []; return notes.length > 0 ? notes[0] as AutotaskTicketNote : null; } catch (error) { this.logger.error(`Failed to get ticket note ${noteId} for ticket ${ticketId}:`, error); throw error; } }