Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

getAllPayments

Retrieve all payments from the Mews hospitality platform using filters for payment IDs, customer IDs, bill IDs, date ranges, states, and pagination settings.

Instructions

Returns all payments based on filter parameters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
PaymentIdsNoFilter by specific payment IDs
CustomerIdsNoFilter by customer IDs
BillIdsNoFilter by bill IDs
CreatedUtcNoDate range filter for payment creation
ConsumedUtcNoDate range filter for payment consumption
StatesNoFilter by payment states
LimitationNoPagination settings

Implementation Reference

  • The execute handler function that performs the HTTP request to retrieve payments based on input filters.
    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/payments/getAll', requestData);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • Input schema defining parameters for filtering payments by IDs, dates, states, and pagination.
    inputSchema: {
      type: 'object',
      properties: {
        PaymentIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by specific payment IDs',
          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
        },
        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 payment creation'
        },
        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 payment consumption'
        },
        States: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by payment states'
        },
        Limitation: {
          type: 'object',
          properties: {
            Count: { type: 'number', description: 'Maximum number of payments to return' },
            Cursor: { type: 'string', description: 'Pagination cursor for next page' }
          },
          description: 'Pagination settings'
        }
      },
      additionalProperties: false
    },
  • Import of the getAllPaymentsTool.
    import { getAllPaymentsTool } from './payments/getAllPayments.js';
  • Inclusion of getAllPaymentsTool in the allTools array for registration.
    getAllPaymentsTool,
  • Tool object definition with name and description.
    export const getAllPaymentsTool: Tool = {
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal insight. It doesn't mention whether this is a read-only operation, potential side effects, rate limits, authentication needs, or the return format (e.g., pagination details implied by the 'Limitation' parameter). This leaves significant gaps for safe and effective use.

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

Conciseness5/5

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

The description is extremely concise—a single sentence that directly states the tool's function. It's front-loaded with the core purpose and avoids unnecessary words, making it efficient and easy to parse.

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

Completeness2/5

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

Given the tool's complexity (7 parameters, nested objects, no output schema, and no annotations), the description is insufficient. It lacks details on behavioral traits, output structure, error handling, and usage context, making it incomplete for an AI agent to reliably invoke this tool without guesswork.

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?

The schema description coverage is 100%, providing detailed parameter documentation, so the description adds no additional parameter semantics beyond implying filtering. This meets the baseline for high schema coverage, but the description doesn't clarify how parameters interact (e.g., if multiple filters are applied) or provide usage examples.

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 tool's purpose with a specific verb ('Returns') and resource ('all payments'), making it understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'getAllBills' or 'getAllAccountingItems', which follow a similar pattern but target different resources.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions 'based on filter parameters' but doesn't specify scenarios, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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