Skip to main content
Glama

addAccountingItems

Add charges, payments, and other financial items to customer bills in the Mews hospitality platform to manage billing and accounting transactions.

Instructions

Adds new accounting items (charges, payments, etc.) to customer bills

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
AccountingItemsYesArray of accounting item objects to create

Implementation Reference

  • The main handler function that executes the tool by calling the Mews API endpoint /api/connector/v1/accountingItems/add with the provided accounting items data.
    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/accountingItems/add', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • The input schema defining the structure of the AccountingItems array, including required fields like CustomerId, AccountingCategoryId, and Amount object.
    inputSchema: { type: 'object', properties: { AccountingItems: { type: 'array', items: { type: 'object', properties: { CustomerId: { type: 'string', description: 'Customer ID' }, AccountingCategoryId: { type: 'string', description: 'Accounting category ID' }, Amount: { type: 'object', properties: { Currency: { type: 'string', description: 'Currency code' }, Value: { type: 'number', description: 'Amount value' } }, required: ['Currency', 'Value'], description: 'Amount object' }, ConsumedUtc: { type: 'string', description: 'Consumption date/time (ISO 8601)' }, Notes: { type: 'string', description: 'Item notes' }, Name: { type: 'string', description: 'Item name' } }, required: ['CustomerId', 'AccountingCategoryId', 'Amount'] }, description: 'Array of accounting item objects to create' } }, required: ['AccountingItems'], additionalProperties: false },
  • Registration of the addAccountingItemsTool in the allTools array, making it available for execution.
    addAccountingItemsTool,
  • Import statement that brings the addAccountingItemsTool into the index file for registration.
    import { addAccountingItemsTool } from './finance/addAccountingItems.js';

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/code-rabi/mews-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server