Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

addPayment

Apply a payment to a customer's bill in the Mews hospitality platform. Specify customer, amount, and payment method to record financial transactions.

Instructions

Adds a new payment to a customer's bill

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
CustomerIdYesCustomer ID for the payment
BillIdNoSpecific bill ID to apply payment to
AmountYesPayment amount object
PaymentMethodIdYesPayment method identifier
NotesNoPayment notes
ConsumedUtcNoPayment consumption date/time (ISO 8601)

Implementation Reference

  • The execute method that handles the tool logic: validates input, calls the Mews API /payments/add endpoint using mewsRequest utility, and returns the JSON result.
    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/payments/add', requestData);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • JSON Schema defining the input parameters for the addPayment tool, including required fields CustomerId, Amount, PaymentMethodId.
    inputSchema: {
      type: 'object',
      properties: {
        CustomerId: {
          type: 'string',
          description: 'Customer ID for the payment'
        },
        BillId: {
          type: 'string',
          description: 'Specific bill ID to apply payment to'
        },
        Amount: {
          type: 'object',
          properties: {
            Currency: { type: 'string', description: 'Payment currency code' },
            Value: { type: 'number', description: 'Payment amount value' }
          },
          required: ['Currency', 'Value'],
          description: 'Payment amount object'
        },
        PaymentMethodId: {
          type: 'string',
          description: 'Payment method identifier'
        },
        Notes: {
          type: 'string',
          description: 'Payment notes'
        },
        ConsumedUtc: {
          type: 'string',
          description: 'Payment consumption date/time (ISO 8601)'
        }
      },
      required: ['CustomerId', 'Amount', 'PaymentMethodId'],
      additionalProperties: false
    },
  • Import statement bringing the addPaymentTool into the central tools index.
    import { addPaymentTool } from './payments/addPayment.js';
  • addPaymentTool is registered by being included in the allTools array, which populates the toolMap and is used for tool definitions and execution.
    addPaymentTool,
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Adds' implies a write/mutation operation, it doesn't specify permissions required, whether the action is reversible, rate limits, error conditions, or what happens to the bill balance. For a payment tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence that gets straight to the point with no wasted words. It's appropriately sized for a tool with good schema coverage, though it could potentially benefit from a second sentence about behavioral aspects given the lack of annotations.

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?

For a payment creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, side effects, or how it differs from similar tools. The combination of mutation behavior, financial implications, and lack of structured metadata requires more comprehensive description.

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 6 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters, format expectations beyond schema, or usage examples. Baseline 3 is appropriate when schema does the heavy lifting.

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 action ('Adds a new payment') and target resource ('to a customer's bill'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'chargeCreditCard' or 'getAllPayments', which reduces clarity about when this specific tool should be used versus alternatives.

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 like 'chargeCreditCard' or 'getAllPayments', nor does it mention prerequisites, exclusions, or specific contexts. It simply states what the tool does without helping the agent choose between available options.

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