getAllAccountNotes
Retrieve all account notes linked to specified accounts in Mews MCP, filtering by ID, creation or update date range, and pagination for efficient data management.
Instructions
Returns all the account notes associated with the specified accounts within the chain
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| AccountIds | No | Filter by account IDs | |
| CreatedUtc | No | Date range filter for note creation | |
| Limitation | No | Pagination settings | |
| UpdatedUtc | No | Date range filter for note updates |
Implementation Reference
- The main handler function for the getAllAccountNotes tool. It processes input arguments, constructs the request data with a default limitation, calls the Mews API endpoint '/api/connector/v1/accountNotes/getAll', and returns the result as JSON.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const inputArgs = args as Record<string, unknown>; const requestData = { Limitation: { Count: 100 }, ...inputArgs }; const result = await mewsRequest(config, '/api/connector/v1/accountNotes/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema definition for the getAllAccountNotes tool, specifying properties for AccountIds, date range filters (CreatedUtc, UpdatedUtc), and pagination (Limitation).inputSchema: { type: 'object', properties: { AccountIds: { type: 'array', items: { type: 'string' }, description: 'Filter by account IDs', maxItems: 1000 }, CreatedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of creation date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of creation date range (ISO 8601)' } }, description: 'Date range filter for note creation' }, UpdatedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of update date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of update date range (ISO 8601)' } }, description: 'Date range filter for note updates' }, Limitation: { type: 'object', properties: { Count: { type: 'number', description: 'Maximum number of notes to return' }, Cursor: { type: 'string', description: 'Pagination cursor for next page' } }, description: 'Pagination settings' } }, additionalProperties: false },
- src/tools/index.ts:136-136 (registration)Registration of the getAllAccountNotesTool in the allTools array, making it available for execution.getAllAccountNotesTool,
- src/tools/index.ts:51-51 (registration)Import statement that brings the getAllAccountNotesTool into the index file for registration.import { getAllAccountNotesTool } from './accountNotes/getAllAccountNotes.js';