Skip to main content
Glama

addCompany

Create new company records in Mews hospitality platform by entering company details like name, tax ID, contact information, and billing email.

Instructions

Adds a new company

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
NameYesCompany name
TaxIdentifierNoTax identification number
EmailNoCompany email address
PhoneNoCompany phone number
WebsiteUrlNoCompany website URL
InvoicingEmailNoBilling email address
ContactPersonIdNoContact person customer ID

Implementation Reference

  • The async execute method implementing the core logic of the addCompany tool: parses input arguments and sends a POST request to the Mews API endpoint '/api/connector/v1/companies/add', returning the JSON 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/add', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Input schema for the addCompany tool, defining object properties like Name (required), TaxIdentifier, Email, Phone, WebsiteUrl, InvoicingEmail, ContactPersonId with descriptions.
    inputSchema: { type: 'object', properties: { 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: ['Name'], additionalProperties: false },
  • Import statement for the addCompanyTool from its dedicated implementation file.
    import { addCompanyTool } from './companies/addCompany.js';
  • Registration of addCompanyTool within the allTools array (alongside other company tools), used for tool discovery, definitions, and execution lookup via toolMap.
    // 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