getAllBills
Retrieve billing information from Mews hospitality platform by filtering bills using IDs, customer data, date ranges, states, or pagination settings.
Instructions
Returns all bills by filter parameters, used for retrieving billing information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| BillIds | No | Filter by specific bill IDs | |
| CustomerIds | No | Filter by customer IDs | |
| CreatedUtc | No | Date range filter for bill creation | |
| UpdatedUtc | No | Date range filter for bill updates | |
| States | No | Filter by bill states | |
| Limitation | No | Pagination settings |
Implementation Reference
- src/tools/finance/getAllBills.ts:56-72 (handler)The main handler function that processes input arguments, prepares the request data with default limitation, calls the Mews API endpoint '/api/connector/v1/bills/getAll', and returns the result as formatted 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/bills/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema defining the parameters for filtering bills, including BillIds, CustomerIds, date ranges (CreatedUtc, UpdatedUtc), States, and Limitation for pagination.inputSchema: { type: 'object', properties: { BillIds: { type: 'array', items: { type: 'string' }, description: 'Filter by specific bill IDs', maxItems: 1000 }, CustomerIds: { type: 'array', items: { type: 'string' }, description: 'Filter by customer 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 bill 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 bill updates' }, States: { type: 'array', items: { type: 'string' }, description: 'Filter by bill states' }, Limitation: { type: 'object', properties: { Count: { type: 'number', description: 'Maximum number of bills to return' }, Cursor: { type: 'string', description: 'Pagination cursor for next page' } }, description: 'Pagination settings' } }, additionalProperties: false },
- src/tools/index.ts:36-36 (registration)Import statement that brings the getAllBillsTool into the index for aggregation.import { getAllBillsTool } from './finance/getAllBills.js';
- src/tools/index.ts:120-121 (registration)Inclusion of getAllBillsTool in the allTools array, which is used for global tool registry, MCP registration via getToolDefinitions(), and execution via toolMap.// Finance tools getAllBillsTool,