deleteCompanies
Remove specified companies from the Mews hospitality platform by providing their unique IDs using this MCP server tool. Streamline company management and maintain accurate records.
Instructions
Deletes specified companies
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| CompanyIds | Yes | Array of company IDs to delete |
Implementation Reference
- Complete definition of the 'deleteCompaniesTool' including the name, description, input schema, and the execute handler function that performs the HTTP request to delete companies.export const deleteCompaniesTool: Tool = { name: 'deleteCompanies', description: 'Deletes specified companies', inputSchema: { type: 'object', properties: { CompanyIds: { type: 'array', items: { type: 'string' }, description: 'Array of company IDs to delete', maxItems: 1000 } }, required: ['CompanyIds'], 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/companies/delete', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } };
- Input schema definition for the deleteCompanies tool, specifying the CompanyIds array parameter.inputSchema: { type: 'object', properties: { CompanyIds: { type: 'array', items: { type: 'string' }, description: 'Array of company IDs to delete', maxItems: 1000 } }, required: ['CompanyIds'], additionalProperties: false },
- src/tools/index.ts:18-18 (registration)Import statement for the deleteCompaniesTool in the main tools index file.import { deleteCompaniesTool } from './companies/deleteCompanies.js';
- src/tools/index.ts:103-103 (registration)Registration of deleteCompaniesTool in the allTools array export, making it available for use.deleteCompaniesTool,