Skip to main content
Glama
DeepLcom
by DeepLcom

get-source-languages

Retrieve a list of available source languages for translation using the DeepL API. Identify supported languages to ensure accurate and efficient text translation workflows.

Instructions

Get list of available source languages for translation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the get-source-languages tool. It delegates to getDeeplLanguages('source') to retrieve available source languages from the DeepL API.
    async function getSourceLanguages() {
      return await getDeeplLanguages('source');
    }
  • Registration of the get-source-languages tool on the MCP server, specifying name, description, and handler function.
    server.tool(
      'get-source-languages',
      'Get list of available source languages for translation',
      getSourceLanguages
    );
  • Core helper function that calls the appropriate DeepL API method to get source or target languages, formats the response as MCP text content, and handles errors.
    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);
      }
    }
  • Utility function to wrap strings or array of strings into the MCP expected content object structure with type 'text'.
    function mcpTextContentify(param) {
      if (typeof(param) != 'string' && !Array.isArray(param)) {
        throw new Error('mcpTextContentify() expects a string or an array of strings');
      }
    
      const strings = typeof(param) == 'string' ? [param] : param;
    
      const contentObjects = strings.map(
        str => ({
            type: "text",
            text: str
          })
      );
    
      return {
        content: contentObjects
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks details on traits like whether it's read-only, requires authentication, has rate limits, returns structured data, or handles errors. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose with zero waste. Every word earns its place, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states the purpose but lacks context on behavior, output format, or integration with siblings. For a read-like tool, it's complete enough to understand the basic function but misses opportunities to guide usage more effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline of 4 is applied as it meets expectations for a parameterless tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('list of available source languages for translation'), making the purpose immediately understandable. It distinguishes from sibling tools like 'get-target-languages' by specifying 'source' languages, though it doesn't explicitly contrast with all siblings like 'rephrase-text' or 'translate-text'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), when it's appropriate (e.g., before translation), or when to prefer other tools like 'get-target-languages' or 'translate-text' directly. Usage is implied but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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