list_languages
Retrieve all languages configured in a POEditor translation project to manage multilingual content effectively.
Instructions
List languages in the project.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No |
Implementation Reference
- src/server.ts:290-294 (handler)Handler function that calls the poeditor API to list languages for the specified project.async (args) => { const id = requireProjectId(args.project_id ?? null); const res = await poeditor("languages/list", { id: String(id) }); return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] }; }
- src/server.ts:73-75 (schema)Zod schema defining the optional project_id input for the list_languages tool.const ListLanguagesInput = z.object({ project_id: z.number().int().positive().optional() });
- src/server.ts:286-295 (registration)Registration of the list_languages tool using McpServer.tool method, including name, description, input schema, and inline handler.server.tool( "list_languages", "List languages in the project.", ListLanguagesInput.shape, async (args) => { const id = requireProjectId(args.project_id ?? null); const res = await poeditor("languages/list", { id: String(id) }); return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] }; } );