exportAccountingItems
Export accounting items like charges and payments from Mews in CSV, JSON, or Excel format for a specified date range to support financial reporting and analysis.
Instructions
Exports accounting items (charges, payments, etc.) in the specified format and period
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| StartUtc | Yes | Start date for export (ISO 8601) | |
| EndUtc | Yes | End date for export (ISO 8601) | |
| Format | Yes | Export format (CSV, JSON, etc.) | |
| AccountingItemIds | No | Specific accounting item IDs to export | |
| Currency | No | Currency code for export amounts | |
| TimeZone | No | Time zone for date formatting |
Implementation Reference
- The execute function implementing the core logic of the exportAccountingItems tool by forwarding input arguments to the Mews API endpoint '/api/connector/v1/exports/accountingItems' and returning the JSON-formatted result.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const inputArgs = args as Record<string, unknown>; const requestData = { ...inputArgs }; const result = await mewsRequest(config, '/api/connector/v1/exports/accountingItems', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema for the exportAccountingItems tool, specifying required date range and format, with optional filters for accounting items, currency, and timezone.inputSchema: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start date for export (ISO 8601)' }, EndUtc: { type: 'string', description: 'End date for export (ISO 8601)' }, Format: { type: 'string', description: 'Export format (CSV, JSON, etc.)', enum: ['Csv', 'Json', 'Excel'] }, AccountingItemIds: { type: 'array', items: { type: 'string' }, description: 'Specific accounting item IDs to export', maxItems: 1000 }, Currency: { type: 'string', description: 'Currency code for export amounts' }, TimeZone: { type: 'string', description: 'Time zone for date formatting' } }, required: ['StartUtc', 'EndUtc', 'Format'], additionalProperties: false },
- src/tools/index.ts:143-145 (registration)Registers the exportAccountingItemsTool in the central allTools array used for MCP server tool definitions and execution lookup.// Export tools exportAccountingItemsTool, exportReservationsTool,