Skip to main content
Glama

lokalise_list_project_languages

Retrieve all languages in a translation project with optional progress percentages to audit coverage and identify incomplete translations.

Instructions

Shows which languages are currently being translated in a project. Required: projectId. Optional: includeProgress (shows completion %), limit, page. Use to audit translation coverage, identify incomplete languages, or prepare reports. Returns: Active languages with progress stats. Start here to understand project's localization scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID to list languages for
includeProgressNoInclude translation progress percentages for each language

Implementation Reference

  • Registration of the 'lokalise_list_project_languages' tool on the MCP server. Calls server.tool() with the tool name, description, schema shape, and handler function.
    // Register project languages listing tool
    server.tool(
    	"lokalise_list_project_languages",
    	"Shows which languages are currently being translated in a project. Required: projectId. Optional: includeProgress (shows completion %), limit, page. Use to audit translation coverage, identify incomplete languages, or prepare reports. Returns: Active languages with progress stats. Start here to understand project's localization scope.",
    	ListProjectLanguagesToolArgs.shape,
    	handleListProjectLanguages,
    );
  • The MCP tool handler function 'handleListProjectLanguages'. It receives typed args, logs, calls languagesController.listProjectLanguages(args), and formats the response as MCP text content.
    async function handleListProjectLanguages(
    	args: ListProjectLanguagesToolArgsType,
    ) {
    	const methodLogger = Logger.forContext(
    		"tools/languages.tool.ts",
    		"handleListProjectLanguages",
    	);
    	methodLogger.debug(
    		`Getting Lokalise project languages for project ${args.projectId}...`,
    		args,
    	);
    
    	try {
    		// Pass args directly to the controller
    		const result = await languagesController.listProjectLanguages(args);
    		methodLogger.debug("Got the response from the controller", result);
    
    		// Format the response for the MCP tool
    		return {
    			content: [
    				{
    					type: "text" as const,
    					text: result.content,
    				},
    			],
    		};
    	} catch (error) {
    		methodLogger.error(
    			`Error getting languages for project: ${args.projectId}`,
    			error,
    		);
    		return formatErrorForMcpTool(error);
    	}
    }
  • Zod schema (ListProjectLanguagesToolArgs) and TypeScript type (ListProjectLanguagesToolArgsType) defining the input validation for the tool. Requires projectId (string), optional includeProgress (boolean, defaults to false).
    /**
     * Zod schema for the list project languages tool arguments.
     */
    export const ListProjectLanguagesToolArgs = z
    	.object({
    		projectId: z.string().describe("Project ID to list languages for"),
    		includeProgress: z
    			.boolean()
    			.optional()
    			.default(false)
    			.describe("Include translation progress percentages for each language"),
    	})
    	.strict();
    
    /**
     * TypeScript type inferred from the ListProjectLanguagesToolArgs Zod schema.
     */
    export type ListProjectLanguagesToolArgsType = z.infer<
    	typeof ListProjectLanguagesToolArgs
    >;
  • Controller function 'listProjectLanguages' that orchestrates the tool logic: validates projectId, calls languagesService.getProjectLanguages(), and formats the result via formatProjectLanguages().
    		);
    	}
    }
    
    /**
     * @function listProjectLanguages
     * @description Lists all languages in a specific Lokalise project.
     * @memberof LanguagesController
     * @param {ListProjectLanguagesToolArgsType} args - Arguments containing project and language options
     * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted languages list in Markdown.
     * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error.
     */
    async function listProjectLanguages(
  • Service function 'getProjectLanguages' that calls the Lokalise SDK (api.languages().list()) to fetch project languages from the API.
    async function getProjectLanguages(projectId: string): Promise<Language[]> {
    	const methodLogger = Logger.forContext(
    		"services/vendor.lokalise.com.languages.service.ts",
    		"getProjectLanguages",
    	);
    	methodLogger.debug("Calling Lokalise API for project languages", {
    		projectId,
    	});
    
    	try {
    		const api = getLokaliseApi();
    
    		// Use SDK to fetch project languages
    		const response = await api.languages().list({ project_id: projectId });
    
    		methodLogger.debug(
    			`Received project languages from Lokalise API: ${response.items.length} languages`,
    		);
    
    		// Return the SDK response items directly as they match our Language type
    		return response.items as Language[];
    	} catch (error) {
    		methodLogger.error(
    			"Service error fetching Lokalise project languages",
    			error,
    		);
    
    		// Rethrow other McpErrors
    		if (error instanceof McpError) {
    			throw error;
    		}
    
    		// Wrap any other unexpected errors
    		throw createUnexpectedError(
    			"Unexpected service error while fetching Lokalise project languages",
    			error,
    		);
    	}
    }
    
    /**
     * @function addProjectLanguages
     * @description Adds languages to a project in Lokalise using the official SDK.
     * @memberof VendorLanguagesService
     * @param {string} projectId - The project ID to add languages to.
     * @param {CreateLanguageParams[]} languages - Array of language data to add.
     * @returns {Promise<Language[]>} A promise that resolves to an array of added languages.
     * @throws {McpError} Throws an `McpError` if the API call fails.
     */
    async function addProjectLanguages(
    	projectId: string,
    	languages: CreateLanguageParams[],
    ): Promise<Language[]> {
    	const methodLogger = Logger.forContext(
    		"services/vendor.lokalise.com.languages.service.ts",
    		"addProjectLanguages",
    	);
    	methodLogger.debug("Adding languages to Lokalise project", {
    		projectId,
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions that it returns 'Active languages with progress stats' but does not explicitly state that it is a read-only, safe operation, nor does it disclose any side effects or permissions.

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

Conciseness3/5

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

The description is relatively concise and front-loaded with the purpose. However, it includes inaccurate parameter references (limit, page) that waste space and could mislead, reducing overall efficiency.

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 no output schema, the description gives a vague idea of the return ('Active languages with progress stats') and lists use cases. It does not cover pagination or response structure, which would be helpful for a list tool. The erroneous parameters also detract from completeness.

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?

The description adds meaning to includeProgress by describing it as 'shows completion %', which matches the schema. However, it also mentions 'limit' and 'page' as optional parameters, which are not present in the input schema, causing confusion and misinformation.

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

Purpose5/5

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

The description clearly states what the tool does ('Shows which languages are currently being translated in a project') and lists specific use cases (audit coverage, identify incomplete languages, prepare reports). It distinguishes itself from siblings like lokalise_add_project_languages and lokalise_list_system_languages.

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

Usage Guidelines4/5

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

It explicitly lists required and optional parameters and suggests use cases. It recommends 'Start here to understand project's localization scope,' but does not explicitly compare to alternatives or state when not to use it.

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/AbdallahAHO/lokalise-mcp'

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