Skip to main content
Glama

mergeCustomers

Merge two customer profiles in the Mews hospitality platform by transferring data from a source customer ID to a target customer ID.

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 execute handler function that implements the core logic of the mergeCustomers tool by making an HTTP request to the Mews API endpoint '/api/connector/v1/customers/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 },
  • Registration of the mergeCustomersTool in the allTools array, making it available for execution.
    mergeCustomersTool,
  • Import of the mergeCustomersTool from its implementation file.
    import { mergeCustomersTool } from './customers/mergeCustomers.js';

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