Skip to main content
Glama

lokalise_remove_contributor

Remove a contributor from a project, revoking all access. Ideal for offboarding or security cleanup. Immediate effect: contributor loses all project access.

Instructions

Removes a team member from a project, revoking all access. Required: projectId, contributorId. Use for offboarding, security cleanup, or removing inactive members. Returns: Confirmation of removal. Warning: Immediate effect - contributor loses all project access. Consider permission downgrade instead for temporary changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID containing the contributor
contributorIdYesContributor ID to remove

Implementation Reference

  • MCP tool handler that removes a contributor. Calls contributorsController.removeContributor() and formats the response.
    }
    
    /**
     * @function handleRemoveContributor
     * @description MCP Tool handler to remove a contributor from a project.
     *
     * @param {RemoveContributorToolArgsType} args - Arguments provided to the tool.
     * @returns {Promise<{ content: Array<{ type: 'text', text: string }> }>} Formatted response for the MCP.
     * @throws {McpError} Formatted error if the controller or service layer encounters an issue.
     */
    async function handleRemoveContributor(args: RemoveContributorToolArgsType) {
  • Registration of the 'lokalise_remove_contributor' tool on the MCP server with its schema and handler.
    server.tool(
    	"lokalise_remove_contributor",
    	"Removes a team member from a project, revoking all access. Required: projectId, contributorId. Use for offboarding, security cleanup, or removing inactive members. Returns: Confirmation of removal. Warning: Immediate effect - contributor loses all project access. Consider permission downgrade instead for temporary changes.",
    	RemoveContributorToolArgs.shape,
    	handleRemoveContributor,
    );
  • Zod schema for remove contributor arguments: projectId (string) and contributorId (string | number).
    export const RemoveContributorToolArgs = z
    	.object({
    		projectId: z.string().describe("Project ID containing the contributor"),
    		contributorId: z
    			.union([z.string(), z.number()])
    			.describe("Contributor ID to remove"),
    	})
    	.strict();
    
    export type RemoveContributorToolArgsType = z.infer<
    	typeof RemoveContributorToolArgs
    >;
  • Controller function that validates inputs and calls contributorsService.delete() to remove a contributor.
    async function removeContributor(
    	args: RemoveContributorToolArgsType,
    ): Promise<ControllerResponse> {
    	const methodLogger = Logger.forContext(
    		"contributors.controller.ts",
    		"removeContributor",
    	);
    	methodLogger.debug("Removing contributor...", 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.delete(args);
    
    		// Format response
    		const formattedContent = formatRemoveContributorResult(result);
    
    		methodLogger.debug("Contributor removed successfully", {
    			projectId: args.projectId,
    			contributorId: args.contributorId,
    		});
    
    		return {
    			content: formattedContent,
    		};
    	} catch (error: unknown) {
    		throw handleControllerError(error, {
    			source: "ContributorsController.removeContributor",
    			entityType: "Contributor",
    			entityId: {
    				project: args.projectId,
    				contributor: String(args.contributorId),
    			},
    			operation: "removing",
    		});
    	}
    }
  • Service layer delete function that calls the Lokalise API to remove a contributor from a project.
    async delete(
    	args: RemoveContributorToolArgsType,
    ): Promise<ContributorDeleted> {
    	const methodLogger = logger.forMethod("delete");
    	methodLogger.info("Removing contributor", {
    		projectId: args.projectId,
    		contributorId: args.contributorId,
    	});
    
    	try {
    		const api = getLokaliseApi();
    		const result = await api.contributors().delete(args.contributorId, {
    			project_id: args.projectId,
    		});
    
    		methodLogger.info("Removed contributor successfully", {
    			projectId: args.projectId,
    			contributorId: args.contributorId,
    		});
    
    		return result;
    	} catch (error) {
    		methodLogger.error("Failed to remove contributor", { error, args });
    		throw createUnexpectedError(
    			`Failed to remove contributor ${args.contributorId} from project ${args.projectId}`,
    			error,
    		);
    	}
    },
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses immediate effect, permanent access loss, and that it returns confirmation. Lacks details on error handling or idempotency but is sufficient for the tool's simplicity.

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?

Three concise sentences: action, required params + return, use cases + warning. No fluff, front-loaded with purpose.

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 no output schema, it states return type (confirmation). Covers purpose, usage guidelines, and behavioral impact fully. No gaps for a simple removal 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 coverage is 100% with descriptions for both parameters. Description reiterates that they are required but adds no new semantic meaning beyond what schema provides. Baseline of 3 is appropriate.

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 tool removes a team member from a project and revokes all access. This specific verb+resource clearly distinguishes it from siblings like update_contributor or add_contributors.

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

Usage Guidelines5/5

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

Provides explicit use cases (offboarding, security cleanup, removing inactive members) and an alternative suggestion (permission downgrade for temporary changes). Also specifies required parameters and return value.

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