Skip to main content
Glama

lokalise_get_contributor

Retrieve a team member's full access and permissions details, including language assignments and admin rights. Verify permissions before updates or investigate access issues.

Instructions

Retrieves detailed information about a specific team member's access and permissions. Required: projectId, contributorId. Use to verify exact permissions before updates, investigate access issues, or get complete language assignments. Returns: Full contributor profile including all language permissions and administrative rights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID containing the contributor
contributorIdYesContributor ID to get details for

Implementation Reference

  • MCP tool registration: binds the name 'lokalise_get_contributor' to the GetContributorToolArgs schema and the handleGetContributor handler function.
    server.tool(
    	"lokalise_get_contributor",
    	"Retrieves detailed information about a specific team member's access and permissions. Required: projectId, contributorId. Use to verify exact permissions before updates, investigate access issues, or get complete language assignments. Returns: Full contributor profile including all language permissions and administrative rights.",
    	GetContributorToolArgs.shape,
    	handleGetContributor,
    );
  • Handler function for the 'lokalise_get_contributor' tool. Delegates to contributorsController.getContributor() and formats the result as MCP text content.
    async function handleGetContributor(args: GetContributorToolArgsType) {
    	const methodLogger = Logger.forContext(
    		"contributors.tool.ts",
    		"handleGetContributor",
    	);
    	methodLogger.debug("Getting contributor details...", args);
    
    	try {
    		const result = await contributorsController.getContributor(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 (GetContributorToolArgs) defining the input arguments: projectId (string) and contributorId (string | number). Also exports the inferred TypeScript type.
    export const GetContributorToolArgs = z
    	.object({
    		projectId: z.string().describe("Project ID containing the contributor"),
    		contributorId: z
    			.union([z.string(), z.number()])
    			.describe("Contributor ID to get details for"),
    	})
    	.strict();
    
    export type GetContributorToolArgsType = z.infer<typeof GetContributorToolArgs>;
  • Controller function getContributor() that validates inputs (projectId, contributorId), calls contributorsService.get(), and returns formatted content via formatContributorDetails().
    /**
     * @function getContributor
     * @description Fetches details of a specific contributor.
     * @memberof ContributorsController
     * @param {GetContributorToolArgsType} args - Arguments containing project ID and contributor ID
     * @returns {Promise<ControllerResponse>} A promise that resolves to the formatted contributor details.
     * @throws {McpError} Throws an McpError if the service call fails.
     */
    async function getContributor(
    	args: GetContributorToolArgsType,
    ): Promise<ControllerResponse> {
    	const methodLogger = Logger.forContext(
    		"contributors.controller.ts",
    		"getContributor",
    	);
    	methodLogger.debug("Getting contributor details...", args);
    
    	try {
    		// Validate inputs
    		if (!args.projectId || typeof args.projectId !== "string") {
    			throw new McpError(
    				"Project ID is required and must be a string.",
    				ErrorType.API_ERROR,
    			);
    		}
    
    		if (!args.contributorId) {
    			throw new McpError("Contributor ID is required.", ErrorType.API_ERROR);
    		}
    
    		// Call service layer
    		const result = await contributorsService.get(args);
    
    		// Format response
    		const formattedContent = formatContributorDetails(result);
    
    		methodLogger.debug("Contributor details fetched successfully", {
    			projectId: args.projectId,
    			contributorId: args.contributorId,
    		});
    
    		return {
    			content: formattedContent,
    		};
    	} catch (error: unknown) {
    		throw handleControllerError(error, {
    			source: "ContributorsController.getContributor",
    			entityType: "Contributor",
    			entityId: {
    				project: args.projectId,
    				contributor: String(args.contributorId),
    			},
    			operation: "retrieving",
    		});
    	}
    }
  • Service layer get() method that invokes the Lokalise API client (api.contributors().get()) to fetch a single contributor by ID for a given project.
    /**
     * Get a specific contributor
     */
    async get(args: GetContributorToolArgsType): Promise<Contributor> {
    	const methodLogger = logger.forMethod("get");
    	methodLogger.info("Getting contributor", {
    		projectId: args.projectId,
    		contributorId: args.contributorId,
    	});
    
    	try {
    		const api = getLokaliseApi();
    		const result = await api.contributors().get(args.contributorId, {
    			project_id: args.projectId,
    		});
    
    		methodLogger.info("Retrieved contributor successfully", {
    			projectId: args.projectId,
    			contributorId: args.contributorId,
    			email: result.email,
    		});
    
    		return result;
    	} catch (error) {
    		methodLogger.error("Failed to get contributor", { error, args });
    		throw createUnexpectedError(
    			`Failed to get contributor ${args.contributorId} from project ${args.projectId}`,
    			error,
    		);
    	}
    },
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It describes the tool as retrieving information and specifies the return content ('Full contributor profile including all language permissions and administrative rights'). It does not mention side effects, but since it is a read operation, this is adequate for transparency.

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 consists of three concise sentences, each serving a distinct purpose: purpose, required parameters, and return value. No unnecessary words or repetition.

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

Completeness4/5

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

Given the simplicity of the tool (2 required params, no output schema), the description provides sufficient context about the output. It mentions the return content in enough detail to set expectations.

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 coverage is 100%, with both parameters described. The description adds that the parameters are 'Required', which is already indicated in the schema. No additional semantic meaning beyond the schema is provided.

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 the action ('Retrieves detailed information') and the resource ('specific team member's access and permissions'). It distinguishes from sibling tools like lokalise_list_contributors (list all) and lokalise_update_contributor (update).

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 explicit use cases: 'verify exact permissions before updates, investigate access issues, or get complete language assignments.' It implies when to use this over alternatives, but does not explicitly 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