Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

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';
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only mentions the required filter constraint. It doesn't disclose important behavioral traits like whether this is a read-only operation, pagination behavior (though the Limitation parameter hints at it), rate limits, authentication requirements, or what happens when no items match filters. The description adds minimal value beyond the basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: the first states the purpose, the second provides critical usage constraint. Both sentences earn their place, and the important requirement is front-loaded in the second sentence. It could be slightly more structured by explicitly listing the required parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (11 parameters, nested objects, no output schema, and no annotations), the description is minimally adequate. It covers the core purpose and critical filter requirement but lacks information about return format, pagination behavior, error conditions, or relationship to sibling tools. For a retrieval tool with many parameters, more context would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 11 parameters thoroughly. The description adds value by specifying which parameters are required filters (AccountingItemIds, RebatedItemIds, ClosedUtc, ConsumedUtc, UpdatedUtc) and that at least one must be specified, which isn't captured in the schema's required fields. This compensates for the schema's limitation of having 0 required parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Returns') and resource ('all accounting items') with examples of what's included ('charges, payments, etc.'). It distinguishes from sibling tools like 'exportAccountingItems' by being a retrieval rather than export operation, though it doesn't explicitly contrast with other 'getAll' tools that retrieve different resource types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool by stating the REQUIRED filter condition ('At least one of the following filters must be specified'), which helps the agent understand prerequisites. However, it doesn't specify when NOT to use it or mention alternatives like 'exportAccountingItems' for bulk data export scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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