getLanguageTexts
Retrieve translations of texts in specified languages to support multi-language needs across the Mews hospitality platform. Input language codes and scope to fetch relevant text data.
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 method implementing the core logic of the getLanguageTexts tool: parses input args, forwards to mewsRequest API endpoint '/api/connector/v1/languages/getTexts', 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 defining the parameters for the tool: required LanguageCodes array and optional Scope string.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:33-33 (registration)Import statement bringing the getLanguageTextsTool into the index module.import { getLanguageTextsTool } from './configuration/getLanguageTexts.js';
- src/tools/index.ts:117-119 (registration)Registration of the tool by including getLanguageTextsTool in the allTools array for global registry.getAllLanguagesTool, getLanguageTextsTool,