getLanguageTexts
Retrieve translated texts for specified languages and scope from the Mews hospitality platform to support multilingual operations.
Instructions
Returns translations of texts in the specified languages
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| LanguageCodes | Yes | Array of language codes to get translations for | |
| Scope | No | Scope of texts to retrieve |
Implementation Reference
- The async execute handler function that parses arguments, calls the Mews API via mewsRequest to fetch language texts, and returns formatted 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/languages/getTexts', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema specifying LanguageCodes (required array of language codes) and optional Scope for retrieving translations.inputSchema: { type: 'object', properties: { LanguageCodes: { type: 'array', items: { type: 'string' }, description: 'Array of language codes to get translations for' }, Scope: { type: 'string', description: 'Scope of texts to retrieve' } }, required: ['LanguageCodes'], additionalProperties: false },
- src/tools/index.ts:117-118 (registration)Registers getLanguageTextsTool in the central allTools array for MCP tool availability.getAllLanguagesTool, getLanguageTextsTool,
- src/tools/index.ts:33-33 (registration)Imports the getLanguageTextsTool implementation to make it available for registration.import { getLanguageTextsTool } from './configuration/getLanguageTexts.js';