Skip to main content
Glama

list_available_languages

Retrieve all supported language codes from POEditor's translation management system to identify available options for multilingual content projects.

Instructions

List all available languages that POEditor supports (not project-specific, but all possible language codes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Inline handler function for the 'list_available_languages' tool. It calls the POEditor 'languages/available' API endpoint and returns the list of available languages as a formatted JSON text block.
    async () => {
      const res = await poeditor("languages/available", {});
      return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] };
    }
  • src/server.ts:297-305 (registration)
    Registration of the 'list_available_languages' tool using server.tool(). Includes name, description, empty input schema, and inline handler.
    server.tool(
      "list_available_languages",
      "List all available languages that POEditor supports (not project-specific, but all possible language codes).",
      {},
      async () => {
        const res = await poeditor("languages/available", {});
        return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] };
      }
    );
  • Empty Zod schema object indicating the tool takes no input parameters.
    {},
  • Helper function 'poeditor' used by the tool handler to make authenticated API requests to POEditor.
    export async function poeditor(endpoint: string, form: Record<string, string>) {
      const body = new URLSearchParams({ api_token: API_TOKEN!, ...form });
      const { body: resBody } = await request(`${API_BASE}/${endpoint}`, {
        method: "POST",
        headers: { "Content-Type": "application/x-www-form-urlencoded" },
        body: body.toString()
      });
      const text = await resBody.text();
      let json: any;
      try { json = JSON.parse(text); } catch (e) {
        throw new Error(`POEditor: invalid JSON response: ${text}`);
      }
      const status = json?.response?.status;
      if (status !== "success") {
        const code = json?.response?.code;
        const message = json?.response?.message || "Unknown POEditor error";
        throw new Error(`POEditor API error ${code ?? ""}: ${message}`);
      }
      return json;
    }

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