Skip to main content
Glama

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
NameRequiredDescriptionDefault
CompanyUpdatesYesArray 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 },
  • Import statement that brings the updateCompaniesTool into the index file for registration.
    import { updateCompaniesTool } from './companies/updateCompanies.js';
  • Registration of updateCompaniesTool within the company tools section of the allTools export array.
    // Company tools getAllCompaniesTool, addCompanyTool, updateCompaniesTool, deleteCompaniesTool,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/code-rabi/mews-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server