deleteLoyaltyMemberships
Remove loyalty memberships from the Mews hospitality platform by specifying membership IDs, enabling customer program management and data cleanup.
Instructions
Deletes loyalty memberships
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"LoyaltyMembershipIds": "<LoyaltyMembershipIds>"
},
"name": "deleteLoyaltyMemberships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| LoyaltyMembershipIds | Yes | Unique identifier of the loyalty memberships to be deleted |
Implementation Reference
- The execute function that performs the tool logic by calling the Mews API endpoint /api/connector/v1/loyaltyMemberships/delete via mewsRequest utility.
async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const result = await mewsRequest(config, '/api/connector/v1/loyaltyMemberships/delete', args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } - Input schema defining the required LoyaltyMembershipIds array of strings (up to 1000 items).
inputSchema: { type: 'object', properties: { LoyaltyMembershipIds: { type: 'array', items: { type: 'string' }, description: 'Unique identifier of the loyalty memberships to be deleted', maxItems: 1000 } }, required: ['LoyaltyMembershipIds'], additionalProperties: false }, - src/tools/index.ts:157-169 (registration)Registers deleteLoyaltyMembershipsTool by including it in the allTools array (used for toolMap and MCP server registration).
// Loyalty tools getAllLoyaltyMembershipsTool, addLoyaltyMembershipsTool, updateLoyaltyMembershipsTool, deleteLoyaltyMembershipsTool, getAllLoyaltyProgramsTool, addLoyaltyProgramsTool, updateLoyaltyProgramsTool, deleteLoyaltyProgramsTool, getAllLoyaltyTiersTool, addLoyaltyTiersTool, updateLoyaltyTiersTool, deleteLoyaltyTiersTool, - src/tools/index.ts:76-76 (registration)Imports the tool definition for registration in index.ts.
import { deleteLoyaltyMembershipsTool } from './loyalty/deleteLoyaltyMemberships.js';