Skip to main content
Glama

search_ticket_notes

Search and retrieve notes associated with a specific Autotask ticket to track activity history and communication details.

Instructions

Search for notes on a specific ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageSizeNoNumber of results to return (default: 25, max: 100)
ticketIdYesThe ticket ID to search notes for

Implementation Reference

  • Core implementation of searchTicketNotes: queries Autotask notes.list API filtered by ticketId, with configurable pageSize.
    async searchTicketNotes(ticketId: number, options: AutotaskQueryOptionsExtended = {}): Promise<AutotaskTicketNote[]> { const client = await this.ensureClient(); try { this.logger.debug(`Searching ticket notes for ticket ${ticketId}:`, options); // Set reasonable limits for notes const optimizedOptions = { filter: [ { field: 'ticketId', op: 'eq', value: ticketId } ], pageSize: options.pageSize || 25 }; const result = await client.notes.list(optimizedOptions); const notes = (result.data as any[]) || []; this.logger.info(`Retrieved ${notes.length} ticket notes`); return notes as AutotaskTicketNote[]; } catch (error) { this.logger.error(`Failed to search ticket notes for ticket ${ticketId}:`, error); throw error; } }
  • Input schema definition for the search_ticket_notes tool, specifying ticketId (required) and optional pageSize.
    { 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'] } },
  • Tool registration in listTools(): defines name, description, and inputSchema for MCP tool listing.
    { 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'] } },
  • Dispatch handler in callTool switch: extracts args and delegates to autotaskService.searchTicketNotes.
    case 'search_ticket_notes': result = await this.autotaskService.searchTicketNotes(args.ticketId, { pageSize: args.pageSize }); message = `Found ${result.length} ticket notes`; break;

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