Skip to main content
Glama

addCustomer

Create a new customer in the Mews MCP server by inputting details like name, email, phone, birthdate, citizenship, and more. Streamline guest management in hospitality systems.

Instructions

Create a new customer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
BirthDateNoBirth date (ISO 8601 format)
BirthPlaceNoPlace of birth
CitizenshipCountryCodeNoISO country code of citizenship
EmailNoCustomer email address
FirstNameNoCustomer first name
GenderCodeNoGender code
LanguageCodeNoPreferred language ISO code
LastNameNoCustomer last name
LoyaltyCodeNoLoyalty program code
NationalityCountryCodeNoISO country code of nationality
OccupationNoCustomer occupation
PhoneNoCustomer phone number
SecondLastNameNoSecond last name
TaxIdentifierNoTax identification number
TitleNoCustomer title (Mr, Ms, etc.)

Implementation Reference

  • The full addCustomerTool object defining the tool's handler (execute function), schema, name, and description. The handler sends a request to the Mews API to add a customer.
    export const addCustomerTool: Tool = { name: 'addCustomer', description: 'Create a new customer', inputSchema: { type: 'object', properties: { FirstName: { type: 'string', description: 'Customer first name' }, LastName: { type: 'string', description: 'Customer last name' }, Email: { type: 'string', format: 'email', description: 'Customer email address' }, Phone: { type: 'string', description: 'Customer phone number' }, BirthDate: { type: 'string', description: 'Birth date (ISO 8601 format)' }, BirthPlace: { type: 'string', description: 'Place of birth' }, CitizenshipCountryCode: { type: 'string', description: 'ISO country code of citizenship' }, GenderCode: { type: 'string', description: 'Gender code' }, LanguageCode: { type: 'string', description: 'Preferred language ISO code' }, NationalityCountryCode: { type: 'string', description: 'ISO country code of nationality' }, Occupation: { type: 'string', description: 'Customer occupation' }, Title: { type: 'string', description: 'Customer title (Mr, Ms, etc.)' }, SecondLastName: { type: 'string', description: 'Second last name' }, TaxIdentifier: { type: 'string', description: 'Tax identification number' }, LoyaltyCode: { type: 'string', description: 'Loyalty program code' } } }, async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const result = await mewsRequest(config, '/api/connector/v1/customers/add', args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } };
  • Input schema for the addCustomer tool defining all customer properties.
    inputSchema: { type: 'object', properties: { FirstName: { type: 'string', description: 'Customer first name' }, LastName: { type: 'string', description: 'Customer last name' }, Email: { type: 'string', format: 'email', description: 'Customer email address' }, Phone: { type: 'string', description: 'Customer phone number' }, BirthDate: { type: 'string', description: 'Birth date (ISO 8601 format)' }, BirthPlace: { type: 'string', description: 'Place of birth' }, CitizenshipCountryCode: { type: 'string', description: 'ISO country code of citizenship' }, GenderCode: { type: 'string', description: 'Gender code' }, LanguageCode: { type: 'string', description: 'Preferred language ISO code' }, NationalityCountryCode: { type: 'string', description: 'ISO country code of nationality' }, Occupation: { type: 'string', description: 'Customer occupation' }, Title: { type: 'string', description: 'Customer title (Mr, Ms, etc.)' }, SecondLastName: { type: 'string', description: 'Second last name' }, TaxIdentifier: { type: 'string', description: 'Tax identification number' }, LoyaltyCode: { type: 'string', description: 'Loyalty program code' } } },
  • src/tools/index.ts:9-9 (registration)
    Import of the addCustomerTool.
    import { addCustomerTool } from './customers/addCustomer.js';
  • Registration of addCustomerTool in the allTools array used for MCP tool registry.
    addCustomerTool,

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