updateCompanies
Modify company details in Mews hospitality platform, including name, tax ID, contact information, and billing data for multiple companies simultaneously.
Instructions
Updates company information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| CompanyUpdates | Yes | Array of company update objects |
Implementation Reference
- The handler function that executes the tool logic by making an HTTP request to the Mews API endpoint '/api/connector/v1/companies/update' with the provided input arguments.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/update', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- The input schema defining the structure for company updates, requiring an array of CompanyUpdates with at least CompanyId.inputSchema: { type: 'object', properties: { CompanyUpdates: { type: 'array', items: { type: 'object', properties: { CompanyId: { type: 'string', description: 'Unique identifier of the company to update' }, Name: { type: 'string', description: 'Company name' }, TaxIdentifier: { type: 'string', description: 'Tax identification number' }, Email: { type: 'string', description: 'Company email address' }, Phone: { type: 'string', description: 'Company phone number' }, WebsiteUrl: { type: 'string', description: 'Company website URL' }, InvoicingEmail: { type: 'string', description: 'Billing email address' }, ContactPersonId: { type: 'string', description: 'Contact person customer ID' } }, required: ['CompanyId'] }, description: 'Array of company update objects' } }, required: ['CompanyUpdates'], additionalProperties: false },
- src/tools/index.ts:17-17 (registration)Import statement that brings the updateCompaniesTool into the tools index module.import { updateCompaniesTool } from './companies/updateCompanies.js';
- src/tools/index.ts:102-102 (registration)Registration of the updateCompaniesTool in the central allTools array, making it available for the MCP server.updateCompaniesTool,