updateCompanies
Modify company details such as name, tax identifier, email, phone, and website URLs in the Mews hospitality platform using structured input data.
Instructions
Updates company information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| CompanyUpdates | Yes | Array of company update objects |
Implementation Reference
- The execute handler function that takes config and args, spreads args into requestData, calls mewsRequest to '/api/connector/v1/companies/update', and returns the JSON stringified result.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) }] }; }
- JSON Schema defining the input as an object with 'CompanyUpdates' array of company objects, each requiring 'CompanyId' and optionally other fields like Name, Email, etc.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 index file for registration.import { updateCompaniesTool } from './companies/updateCompanies.js';
- src/tools/index.ts:99-104 (registration)Registration of updateCompaniesTool within the company tools section of the allTools export array.// Company tools getAllCompaniesTool, addCompanyTool, updateCompaniesTool, deleteCompaniesTool,