search_project_notes
Find project notes by entering a project ID to retrieve relevant information and updates for efficient project management.
Instructions
Search for notes on a specific project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | The project ID to search notes for | |
| pageSize | No | Number of results to return (default: 25, max: 100) |
Implementation Reference
- Core handler implementation that queries the Autotask 'notes' API endpoint filtered by projectId, with optional pageSize pagination.async searchProjectNotes(projectId: number, options: AutotaskQueryOptionsExtended = {}): Promise<AutotaskProjectNote[]> { const client = await this.ensureClient(); try { this.logger.debug(`Searching project notes for project ${projectId}:`, options); const optimizedOptions = { filter: [ { field: 'projectId', op: 'eq', value: projectId } ], pageSize: options.pageSize || 25 }; const result = await client.notes.list(optimizedOptions); const notes = (result.data as any[]) || []; this.logger.info(`Retrieved ${notes.length} project notes`); return notes as AutotaskProjectNote[]; } catch (error) { this.logger.error(`Failed to search project notes for project ${projectId}:`, error); throw error; } }
- src/handlers/tool.handler.ts:572-591 (schema)Input schema definition and tool registration metadata for the search_project_notes tool.{ name: 'search_project_notes', description: 'Search for notes on a specific project', inputSchema: { type: 'object', properties: { projectId: { type: 'number', description: 'The project ID to search notes for' }, pageSize: { type: 'number', description: 'Number of results to return (default: 25, max: 100)', minimum: 1, maximum: 100 } }, required: ['projectId'] } },
- src/handlers/tool.handler.ts:1200-1203 (handler)Tool dispatch handler in callTool() method that delegates to AutotaskService.searchProjectNotes and formats the MCP response.case 'search_project_notes': result = await this.autotaskService.searchProjectNotes(args.projectId, { pageSize: args.pageSize }); message = `Found ${result.length} project notes`; break;
- src/mcp/server.ts:98-111 (registration)MCP server registration of the generic listTools handler which exposes search_project_notes via the toolHandler.listTools().this.server.setRequestHandler(ListToolsRequestSchema, async () => { try { this.logger.debug('Handling list tools request'); const tools = await this.toolHandler.listTools(); return { tools }; } catch (error) { this.logger.error('Failed to list tools:', error); throw new McpError( ErrorCode.InternalError, `Failed to list tools: ${error instanceof Error ? error.message : 'Unknown error'}` ); } });
- src/mcp/server.ts:113-131 (registration)MCP server registration of the generic callTool handler which routes search_project_notes calls to the toolHandler.this.server.setRequestHandler(CallToolRequestSchema, async (request) => { try { this.logger.debug(`Handling tool call: ${request.params.name}`); const result = await this.toolHandler.callTool( request.params.name, request.params.arguments || {} ); return { content: result.content, isError: result.isError }; } catch (error) { this.logger.error(`Failed to call tool ${request.params.name}:`, error); throw new McpError( ErrorCode.InternalError, `Failed to call tool: ${error instanceof Error ? error.message : 'Unknown error'}` ); } });