Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

chargeCreditCard

Process credit card payments to settle customer bills within the Mews hospitality platform. This tool securely charges cards and automatically applies payments to outstanding balances.

Instructions

Charges a credit card and adds the resulting payment to a customer bill

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
CustomerIdYesCustomer ID for the charge
AmountYesCharge amount object
CreditCardDataYesCredit card information
BillIdNoSpecific bill ID to apply charge to
NotesNoCharge notes

Implementation Reference

  • The async execute function that implements the core logic of the chargeCreditCard tool by forwarding input arguments to the Mews API endpoint '/api/connector/v1/payments/chargeCreditCard' via mewsRequest.
    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/chargeCreditCard', requestData);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • Input schema defining the required and optional parameters for the chargeCreditCard tool, including CustomerId, Amount (with Currency and Value), CreditCardData (with Number, Expiry, Name, optional SecurityCode), optional BillId and Notes.
    inputSchema: {
      type: 'object',
      properties: {
        CustomerId: {
          type: 'string',
          description: 'Customer ID for the charge'
        },
        Amount: {
          type: 'object',
          properties: {
            Currency: { type: 'string', description: 'Charge currency code' },
            Value: { type: 'number', description: 'Charge amount value' }
          },
          required: ['Currency', 'Value'],
          description: 'Charge amount object'
        },
        CreditCardData: {
          type: 'object',
          properties: {
            Number: { type: 'string', description: 'Credit card number' },
            Expiry: { type: 'string', description: 'Expiry date (MM/YY)' },
            Name: { type: 'string', description: 'Cardholder name' },
            SecurityCode: { type: 'string', description: 'CVV/CVC code' }
          },
          required: ['Number', 'Expiry', 'Name'],
          description: 'Credit card information'
        },
        BillId: {
          type: 'string',
          description: 'Specific bill ID to apply charge to'
        },
        Notes: {
          type: 'string',
          description: 'Charge notes'
        }
      },
      required: ['CustomerId', 'Amount', 'CreditCardData'],
      additionalProperties: false
    },
  • Registration of the chargeCreditCardTool in the central allTools array, which is used to create the tool registry and map for execution.
    addPaymentTool,
    chargeCreditCardTool,
    getAllPaymentsTool,
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('charges a credit card') but doesn't cover critical traits: whether this is a destructive/mutative operation, authentication needs, error handling, rate limits, or what happens on failure (e.g., if the charge fails). For a financial transaction tool with zero annotation coverage, this is a significant gap.

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 a single, efficient sentence that front-loads the core action and outcome. There's no wasted wording, and it directly communicates the tool's function without unnecessary details.

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 complexity of a financial transaction tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits, error handling, return values, and usage context. While the schema covers parameters well, the overall context for safe and effective use is insufficient.

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 5 parameters thoroughly. The description adds no additional meaning beyond what the schema provides—it doesn't explain parameter relationships, constraints, or usage examples. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

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: 'Charges a credit card and adds the resulting payment to a customer bill.' It specifies the verb ('charges') and resource ('credit card'), and mentions the outcome ('adds...to a customer bill'). However, it doesn't differentiate from sibling tools like 'addPayment' or other payment-related tools, which prevents a score of 5.

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 doesn't mention prerequisites (e.g., customer or bill existence), exclusions, or compare it to sibling tools like 'addPayment'. Without such context, an agent lacks clear usage instructions.

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