Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

mergeCustomers

Combine two customer records into one by merging data from a source customer into a target customer within the Mews hospitality platform.

Instructions

Merges two customers together

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
SourceCustomerIdYesID of customer to merge from
TargetCustomerIdYesID of customer to merge into

Implementation Reference

  • The main handler function for the mergeCustomers tool, which makes an HTTP request to the Mews API endpoint '/api/connector/v1/customers/merge' to perform the customer merge.
    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/customers/merge', requestData);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • Input schema defining the required parameters SourceCustomerId and TargetCustomerId for the mergeCustomers tool.
    inputSchema: {
      type: 'object',
      properties: {
        SourceCustomerId: {
          type: 'string',
          description: 'ID of customer to merge from'
        },
        TargetCustomerId: {
          type: 'string',
          description: 'ID of customer to merge into'
        }
      },
      required: ['SourceCustomerId', 'TargetCustomerId'],
      additionalProperties: false
    },
  • Import statement bringing the mergeCustomersTool into the central tools index.
    import { mergeCustomersTool } from './customers/mergeCustomers.js';
  • Inclusion of mergeCustomersTool in the allTools array, registering it for use.
    mergeCustomersTool,
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. It states 'merges' which implies a destructive or transformative operation, but it doesn't disclose critical behaviors such as whether data from the source customer is preserved, if the merge is irreversible, what permissions are required, or potential side effects like cascading updates to related records.

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, direct sentence with no wasted words, making it easy to parse. However, it lacks front-loaded critical details like the irreversible nature of merging, which could improve structure by prioritizing key behavioral information.

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 merge operation (likely destructive), no annotations, and no output schema, the description is insufficient. It doesn't cover behavioral aspects, usage context, or result expectations, leaving significant gaps for an AI agent to understand and invoke the tool correctly.

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%, with clear descriptions for 'SourceCustomerId' and 'TargetCustomerId'. The description adds no additional meaning beyond the schema, such as explaining the merge direction or outcome. With high schema coverage, the baseline score of 3 is appropriate as the schema handles parameter documentation adequately.

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

Purpose3/5

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

The description 'Merges two customers together' clearly states the action (merges) and resource (customers), but it's vague about what merging entails (e.g., combining records, transferring data). It doesn't differentiate from siblings like 'updateCustomers' or 'deleteCustomers', which could involve customer modifications.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if this should be used instead of deleting a customer or updating customer details, nor does it mention prerequisites like customer existence or data retention policies.

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