deleteCustomers
Remove customer records from the Mews hospitality platform by specifying their IDs to manage guest data and maintain accurate customer databases.
Instructions
Deletes specified customers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| CustomerIds | Yes | Array of customer IDs to delete |
Implementation Reference
- Complete implementation of the deleteCustomers tool, defining its name, description, input schema, and the execute handler that forwards the CustomerIds to the Mews API delete endpoint via mewsRequest utility.export const deleteCustomersTool: Tool = { name: 'deleteCustomers', description: 'Deletes specified customers', inputSchema: { type: 'object', properties: { CustomerIds: { type: 'array', items: { type: 'string' }, description: 'Array of customer IDs to delete', maxItems: 1000 } }, required: ['CustomerIds'], additionalProperties: false }, 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/delete', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } };
- src/tools/index.ts:96-96 (registration)Registers the deleteCustomersTool by including it in the allTools array, which populates the toolMap for lookup and provides definitions for MCP server.deleteCustomersTool,
- src/tools/index.ts:11-11 (registration)Imports the deleteCustomersTool implementation for registration in the tools index.import { deleteCustomersTool } from './customers/deleteCustomers.js';