Skip to main content
Glama

lokalise_list_team_users

Retrieve all users in a Lokalise team with pagination. Use to audit team composition, check access levels, or prepare team changes.

Instructions

Lists all users in a Lokalise team with pagination support. Required: teamId. Optional: limit (100), page. Use to audit team composition, check access levels, or prepare team changes. Returns: Users with roles, permissions, and activity status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdYesTeam ID to list users for
limitNoNumber of users to return (1-100, default: 100)
pageNoPage number for pagination (default: 1)

Implementation Reference

  • Registration of the 'lokalise_list_team_users' tool with the MCP server, binding the tool name to the ListTeamusersToolArgs schema and the handleListTeamusers handler function.
    server.tool(
    	"lokalise_list_team_users",
    	"Lists all users in a Lokalise team with pagination support. Required: teamId. Optional: limit (100), page. Use to audit team composition, check access levels, or prepare team changes. Returns: Users with roles, permissions, and activity status.",
    	ListTeamusersToolArgs.shape,
    	handleListTeamusers,
    );
  • Handler function that calls teamusersController.listTeamusers() and formats the response for the MCP tool output.
    async function handleListTeamusers(args: ListTeamusersToolArgsType) {
    	const methodLogger = Logger.forContext(
    		"teamusers.tool.ts",
    		"handleListTeamusers",
    	);
    	methodLogger.debug(
    		`Getting Lokalise teamusers list (limit: ${args.limit || "default"}, page: ${args.page || "1"})...`,
    		args,
    	);
    
    	try {
    		const result = await teamusersController.listTeamusers(args);
    		methodLogger.debug("Got the response from the controller", result);
    
    		return {
    			content: [
    				{
    					type: "text" as const,
    					text: result.content,
    				},
    			],
    		};
    	} catch (error) {
    		methodLogger.error("Tool failed", {
    			error: (error as Error).message,
    			args,
    		});
    		return formatErrorForMcpTool(error);
    	}
    }
  • Zod schema for the list team users tool arguments: teamId (required string), limit (optional 1-100), page (optional positive integer).
    export const ListTeamusersToolArgs = z
    	.object({
    		teamId: z.string().describe("Team ID to list users for"),
    		limit: z
    			.number()
    			.int()
    			.min(1)
    			.max(100)
    			.optional()
    			.describe("Number of users to return (1-100, default: 100)"),
    		page: z
    			.number()
    			.int()
    			.positive()
    			.optional()
    			.describe("Page number for pagination (default: 1)"),
    	})
    	.strict();
    
    export type ListTeamusersToolArgsType = z.infer<typeof ListTeamusersToolArgs>;
  • Controller layer for listTeamusers that validates inputs (teamId, limit, page) and delegates to teamusersService.list() then formats via formatTeamusersList().
    async function listTeamusers(
    	args: ListTeamusersToolArgsType,
    ): Promise<ControllerResponse> {
    	const methodLogger = Logger.forContext(
    		"teamusers.controller.ts",
    		"listTeamusers",
    	);
    	methodLogger.debug("Getting Lokalise team users list...", args);
    
    	try {
    		// Validate team ID
    		if (!args.teamId || typeof args.teamId !== "string") {
    			throw new McpError(
    				"Team ID is required and must be a string.",
    				ErrorType.API_ERROR,
    			);
    		}
    
    		// Validate pagination parameters
    		if (args.limit !== undefined && (args.limit < 1 || args.limit > 100)) {
    			throw new McpError(
    				"Invalid limit parameter. Must be between 1 and 100.",
    				ErrorType.API_ERROR,
    			);
    		}
    
    		if (args.page !== undefined && args.page < 1) {
    			throw new McpError(
    				"Invalid page parameter. Must be 1 or greater.",
    				ErrorType.API_ERROR,
    			);
    		}
    
    		// Call service layer
    		const result = await teamusersService.list(args);
    
    		// Format response using the formatter
    		const formattedContent = formatTeamusersList(result, args.teamId);
    
    		methodLogger.debug("Team users list fetched successfully", {
    			teamId: args.teamId,
    			userCount: result.items?.length || 0,
    		});
    
    		return {
    			content: formattedContent,
    		};
    	} catch (error: unknown) {
    		throw handleControllerError(error, {
    			source: "TeamusersController.listTeamusers",
    			entityType: "TeamUsers",
    			entityId: args.teamId,
    			operation: "listing",
    		});
    	}
    }
  • Service layer that calls the Lokalise API teamUsers().list() with team_id, page, and limit parameters to fetch the list of team users.
    async list(
    	args: ListTeamusersToolArgsType,
    ): Promise<PaginatedResult<TeamUser>> {
    	const methodLogger = logger.forMethod("list");
    	methodLogger.info("Listing team users", {
    		teamId: args.teamId,
    		page: args.page,
    		limit: args.limit,
    	});
    
    	try {
    		const api = getLokaliseApi();
    		const result = await api.teamUsers().list({
    			team_id: args.teamId,
    			page: args.page,
    			limit: args.limit,
    		});
    
    		methodLogger.info("Listed team users successfully", {
    			teamId: args.teamId,
    			count: result.items.length,
    			totalResults: result.totalResults,
    		});
    
    		return result;
    	} catch (error) {
    		methodLogger.error("Failed to list team users", { error, args });
    		throw createUnexpectedError(
    			`Failed to list team users for team ${args.teamId}`,
    			error,
    		);
    	}
    },
Behavior4/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 discloses that the tool returns users with roles, permissions, and activity status, and mentions pagination support. This covers the essential behavior for a list operation. The description is honest about what it does without hiding side effects.

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 three sentences: first states purpose, second lists parameters, third gives use cases and return summary. It is front-loaded with the most important information and contains no filler or redundant phrases.

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

Completeness5/5

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

Given the tool is a simple list with 3 parameters and no output schema, the description covers the purpose, required and optional parameters, use cases, and the nature of the return data. It is complete for an agent to understand when and how to invoke this tool.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already clearly defines the parameters. The description restates the required (teamId) and optional (limit, page) parameters but does not add significant semantic meaning beyond what the schema provides. The context of use cases (audit, check access) adds some value but not for parameter understanding.

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 states 'Lists all users in a Lokalise team with pagination support,' clearly specifying a verb and resource. It distinguishes from sibling tools like 'lokalise_get_team_user' (single user) by focusing on listing all users, and from 'lokalise_add_members_to_group' (adding users) by being a read operation.

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?

The description provides context: 'Use to audit team composition, check access levels, or prepare team changes.' It does not explicitly state when not to use this tool versus alternatives, but the use cases and required/optional parameters give implicit guidance. Sibling tools like 'lokalise_get_team_user' offer alternative for single-user queries.

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