Skip to main content
Glama

getAllAccountingItems

Retrieve all accounting items like charges and payments from Mews MCP by applying filters such as item IDs, date ranges, or customer IDs to access specific financial data.

Instructions

Returns all accounting items (charges, payments, etc.) based on filter parameters. REQUIRED: At least one of the following filters must be specified: AccountingItemIds, RebatedItemIds, ClosedUtc, ConsumedUtc, or UpdatedUtc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
AccountingItemIdsNoFilter by specific item IDs (one of the required filters)
RebatedItemIdsNoFilter by rebated item IDs (one of the required filters)
CustomerIdsNoFilter by customer IDs
BillIdsNoFilter by bill IDs
AccountingCategoryIdsNoFilter by accounting category IDs
ConsumedUtcNoDate range filter for item consumption (one of the required filters)
ClosedUtcNoDate range filter for when items were closed (one of the required filters)
UpdatedUtcNoDate range filter for when items were last updated (one of the required filters)
CreatedUtcNoDate range filter for item creation
StatesNoFilter by item states
LimitationNoPagination settings

Implementation Reference

  • The main handler function that executes the tool by preparing request data with a default limitation and calling the Mews API endpoint '/api/connector/v1/accountingItems/getAll' via mewsRequest utility.
    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/accountingItems/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • The inputSchema defining validation and structure for tool parameters, including various filters (some required) and pagination options.
    inputSchema: { type: 'object', properties: { AccountingItemIds: { type: 'array', items: { type: 'string' }, description: 'Filter by specific item IDs (one of the required filters)', maxItems: 1000 }, RebatedItemIds: { type: 'array', items: { type: 'string' }, description: 'Filter by rebated item IDs (one of the required filters)', maxItems: 1000 }, CustomerIds: { type: 'array', items: { type: 'string' }, description: 'Filter by customer IDs', maxItems: 1000 }, BillIds: { type: 'array', items: { type: 'string' }, description: 'Filter by bill IDs', maxItems: 1000 }, AccountingCategoryIds: { type: 'array', items: { type: 'string' }, description: 'Filter by accounting category IDs', maxItems: 1000 }, ConsumedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of consumption date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of consumption date range (ISO 8601)' } }, description: 'Date range filter for item consumption (one of the required filters)' }, ClosedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of closed date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of closed date range (ISO 8601)' } }, description: 'Date range filter for when items were closed (one of the required filters)' }, 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 when items were last updated (one of the required filters)' }, 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 item creation' }, States: { type: 'array', items: { type: 'string' }, description: 'Filter by item states' }, Limitation: { type: 'object', properties: { Count: { type: 'number', description: 'Maximum number of items to return' }, Cursor: { type: 'string', description: 'Pagination cursor for next page' } }, description: 'Pagination settings' } }, additionalProperties: false },
  • Registration of the tool in the central allTools array exported from index.ts, which is used to build the toolMap for execution and definitions.
    getAllAccountingItemsTool,
  • Import statement that brings the getAllAccountingItemsTool into the index.ts for registration in allTools.
    import { getAllAccountingItemsTool } from './finance/getAllAccountingItems.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