getAllAccountNotes
Retrieve all account notes from the Mews hospitality platform with filtering options for accounts, dates, and pagination to manage customer information.
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 | |
| UpdatedUtc | No | Date range filter for note updates | |
| Limitation | No | Pagination settings |
Implementation Reference
- The execute handler function processes input args, adds default pagination limit, calls the Mews API to retrieve account notes, and returns the JSON-formatted result.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 defining filters for AccountIds, date ranges (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:135-137 (registration)Registration of the getAllAccountNotesTool in the central allTools array, which populates the toolMap and provides definitions for MCP server.// Account Notes tools getAllAccountNotesTool, addAccountNotesTool,
- src/tools/index.ts:51-51 (registration)Import statement that loads the tool definition for registration in the tools index.import { getAllAccountNotesTool } from './accountNotes/getAllAccountNotes.js';