deleteCompanies
Remove specified companies from the Mews hospitality platform by providing their IDs to manage customer and company data effectively.
Instructions
Deletes specified companies
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": {
"CompanyIds": "<CompanyIds>"
},
"name": "deleteCompanies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| CompanyIds | Yes | Array of company IDs to delete |
Implementation Reference
- The execute method implementing the core logic of the deleteCompanies tool. It processes input arguments and sends a request to the Mews API endpoint for deleting companies.
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 defining the expected parameters for the deleteCompanies tool: an object with a required 'CompanyIds' array of strings (max 1000 items).
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:103-103 (registration)Registers the deleteCompaniesTool by including it in the allTools array, which is used for tool lookup (toolMap) and MCP server definitions (getToolDefinitions).
deleteCompaniesTool,