Skip to main content
Glama

get-target-languages

Retrieve a list of supported target languages for translation using the DeepL API, enabling accurate selection for multilingual text processing.

Instructions

Get list of available target languages for translation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get-target-languages' tool. It calls the helper getDeeplLanguages with 'target' parameter to fetch available target languages from the DeepL API.
    async function getTargetLanguages() { return await getDeeplLanguages('target'); }
  • Registration of the 'get-target-languages' tool using McpServer.tool(). It has no input schema and points to the getTargetLanguages handler.
    server.tool( 'get-target-languages', 'Get list of available target languages for translation', getTargetLanguages );
  • Shared helper function that retrieves either source or target languages from the DeepL API based on the sourceOrDestination parameter ('target' for this tool). Formats the result using mcpTextContentify.
    async function getDeeplLanguages(sourceOrDestination) { const method = sourceOrDestination == 'source' ? 'getSourceLanguages' : 'getTargetLanguages'; try { const languages = await deeplClient[method](); return mcpTextContentify(languages.map(JSON.stringify)); } catch (error) { return handleError(error); } }

Other Tools

Related Tools

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/DeepLcom/deepl-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server