addAddresses
Add new addresses to customer accounts in the Mews hospitality platform. Specify address details including street lines, city, postal code, and country codes for accurate account management.
Instructions
Add new addresses to accounts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Addresses | Yes |
Implementation Reference
- src/tools/accounts/addAddresses.ts:31-39 (handler)Handler function that executes the tool by calling the Mews API to add addresses.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const result = await mewsRequest(config, '/api/connector/v1/addresses/add', args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema defining the structure for the Addresses array, including required AccountId and optional address fields.inputSchema: { type: 'object', properties: { Addresses: { type: 'array', items: { type: 'object', properties: { AccountId: { type: 'string', description: 'Account ID to add address to' }, Line1: { type: 'string', description: 'First line of address' }, Line2: { type: 'string', description: 'Second line of address' }, City: { type: 'string', description: 'City' }, PostalCode: { type: 'string', description: 'Postal/ZIP code' }, CountryCode: { type: 'string', description: 'ISO country code' }, CountrySubdivisionCode: { type: 'string', description: 'State/province code' } }, required: ['AccountId'] } } }, required: ['Addresses'] },
- src/tools/index.ts:89-90 (registration)Registration of the addAddressesTool in the allTools array exported for use in the MCP server.getAllAddressesTool, addAddressesTool,
- src/tools/index.ts:5-5 (registration)Import statement bringing in the addAddressesTool for registration.import { addAddressesTool } from './accounts/addAddresses.js';