Skip to main content
Glama

add_language

Add a new language to your translation project by specifying its code (e.g., 'en', 'de', 'fr') to expand multilingual content management.

Instructions

Add a new language to the project. Provide the language code (e.g., 'en', 'de', 'fr').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNo
languageYes

Implementation Reference

  • The inline handler function for the 'add_language' tool. It resolves the project ID, calls the POEditor 'languages/add' API endpoint with the language code, and returns the API response as formatted JSON.
    async (args) => {
      const id = requireProjectId(args.project_id ?? null);
      const res = await poeditor("languages/add", { id: String(id), language: args.language });
      return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] };
    }
  • Zod input schema for the 'add_language' tool, defining optional project_id (number) and required language (string, min length 2).
    const AddLanguageInput = z.object({
      project_id: z.number().int().positive().optional(),
      language: z.string().min(2)
    });
  • src/server.ts:307-316 (registration)
    Registration of the 'add_language' tool via server.tool(), specifying the name, description, input schema (AddLanguageInput.shape), and inline handler function.
    server.tool(
      "add_language",
      "Add a new language to the project. Provide the language code (e.g., 'en', 'de', 'fr').",
      AddLanguageInput.shape,
      async (args) => {
        const id = requireProjectId(args.project_id ?? null);
        const res = await poeditor("languages/add", { id: String(id), language: args.language });
        return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Add a new language' which implies a mutation operation, but doesn't disclose behavioral traits such as required permissions, whether the operation is idempotent, error conditions, or what happens on success. This is a significant gap for a mutation tool with zero annotation coverage.

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 appropriately sized with two concise sentences that are front-loaded with the core purpose. Every sentence earns its place by stating the action and providing parameter guidance, with zero waste.

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

Completeness2/5

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

Given the complexity (mutation tool with 2 parameters), no annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't cover the 'project_id' parameter, lacks behavioral context, and provides minimal usage guidance, making it inadequate for the tool's requirements.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It only explains the 'language' parameter with an example ('e.g., 'en', 'de', 'fr''), but completely ignores the 'project_id' parameter (which is required in the schema but not mentioned). This leaves half the parameters undocumented, failing to adequately compensate for the schema gap.

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 action ('Add a new language') and the resource ('to the project'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'list_languages' or 'list_available_languages', which would require a 5.

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 like 'list_languages' or 'add_terms_with_translations'. It mentions providing a language code but doesn't specify prerequisites (e.g., needing a project_id) or exclusions, leaving usage context unclear.

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

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/ryan-shaw/poeditor-mcp'

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