get_company_note
Retrieve a specific company note from Autotask PSA using company ID and note ID to access detailed client information and documentation.
Instructions
Get a specific company note by company ID and note ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyId | Yes | The company ID | |
| noteId | Yes | The note ID to retrieve |
Implementation Reference
- Core handler implementation: Queries the Autotask 'notes' API endpoint with filters for accountId (companyId) and note ID to retrieve the specific company note.async getCompanyNote(companyId: number, noteId: number): Promise<AutotaskCompanyNote | null> { const client = await this.ensureClient(); try { this.logger.debug(`Getting company note - CompanyID: ${companyId}, NoteID: ${noteId}`); const result = await client.notes.list({ filter: [ { field: 'accountId', op: 'eq', value: companyId }, { field: 'id', op: 'eq', value: noteId } ] }); const notes = (result.data as any[]) || []; return notes.length > 0 ? notes[0] as AutotaskCompanyNote : null; } catch (error) { this.logger.error(`Failed to get company note ${noteId} for company ${companyId}:`, error); throw error; } }
- src/handlers/tool.handler.ts:1215-1218 (handler)MCP tool handler dispatch: Receives tool call parameters and delegates to AutotaskService.getCompanyNotecase 'get_company_note': result = await this.autotaskService.getCompanyNote(args.companyId, args.noteId); message = `Company note retrieved successfully`; break;
- src/handlers/tool.handler.ts:620-637 (registration)Tool registration: Defines the tool name, description, and input schema returned by listTools() method for MCP discovery.{ name: 'get_company_note', description: 'Get a specific company note by company ID and note ID', inputSchema: { type: 'object', properties: { companyId: { type: 'number', description: 'The company ID' }, noteId: { type: 'number', description: 'The note ID to retrieve' } }, required: ['companyId', 'noteId'] } },
- src/types/autotask.ts:196-205 (schema)TypeScript interface defining the structure of a company note returned by the Autotask API.export interface AutotaskCompanyNote { id?: number; companyID?: number; noteType?: number; title?: string; description?: string; createDate?: string; createdByResourceID?: number; [key: string]: any; }