deleteCustomers
Remove multiple customers from the Mews hospitality platform by specifying their IDs, supporting bulk deletion of up to 1000 entries at once.
Instructions
Deletes specified customers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| CustomerIds | Yes | Array of customer IDs to delete |
Implementation Reference
- The main handler function that executes the tool by sending a POST request to the Mews API /api/connector/v1/customers/delete endpoint with the CustomerIds array.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) }] }; }
- Input schema defining the required CustomerIds parameter as an array of strings (max 1000 items).inputSchema: { type: 'object', properties: { CustomerIds: { type: 'array', items: { type: 'string' }, description: 'Array of customer IDs to delete', maxItems: 1000 } }, required: ['CustomerIds'], additionalProperties: false },
- src/tools/index.ts:96-96 (registration)Registers the deleteCustomersTool in the central allTools array used for MCP tool exposure.deleteCustomersTool,
- src/tools/index.ts:11-11 (registration)Imports the deleteCustomersTool for inclusion in the tools registry.import { deleteCustomersTool } from './customers/deleteCustomers.js';