Skip to main content
Glama

remove_workspace_member

Destructive

Removes a user from a workspace, revoking their workspace access without deleting the user from the organization.

Instructions

Remove a user from a workspace and revoke workspace access. This does not delete the user from the organization; use delete_user for full removal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYesThe workspace ID
user_idYesThe user ID to remove

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Implementation Reference

  • The `removeWorkspaceMember` method in WorkspacesService that performs the actual HTTP DELETE call to /admin/workspaces/{workspaceId}/users/{userId} to remove a user from a workspace.
    async removeWorkspaceMember(
    	workspaceId: string,
    	userId: string,
    ): Promise<{ success: boolean }> {
    	await this.delete(
    		`/admin/workspaces/${this.encodePathSegment(workspaceId)}/users/${this.encodePathSegment(userId)}`,
    	);
    	return { success: true };
    }
  • The Zod schema for `removeWorkspaceMember` tool input, defining `workspace_id` (string) and `user_id` (string) parameters.
    removeWorkspaceMember: {
    	workspace_id: z.string().describe("The workspace ID"),
    	user_id: z.string().describe("The user ID to remove"),
    },
  • MCP tool registration via `server.tool('remove_workspace_member', ...)` within the `registerWorkspacesTools` function. Includes the handler that calls `service.workspaces.removeWorkspaceMember`.
    // Phase 1: Remove workspace member tool
    server.tool(
    	"remove_workspace_member",
    	"Remove a user from a workspace and revoke workspace access. This does not delete the user from the organization; use delete_user for full removal.",
    	WORKSPACES_TOOL_SCHEMAS.removeWorkspaceMember,
    	async (params) => {
    		await service.workspaces.removeWorkspaceMember(
    			params.workspace_id,
    			params.user_id,
    		);
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							message: `Successfully removed user from workspace`,
    							success: true,
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
Behavior4/5

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

Annotations provide destructiveHint=true, and the description adds that it revokes workspace access but does not delete from the organization, clarifying scope. However, no mention of permission requirements or reversibility.

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?

Two sentences, no fluff. The first sentence states the action, the second clarifies scope. Perfectly front-loaded and concise.

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?

For a simple tool with two parameters and annotations covering destructive nature, the description is sufficient. It explains what it does and what it does not do. Could mention side effects or prerequisites, but overall complete.

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?

Input schema has 100% description coverage for both parameters; the description does not add extra semantics beyond what the schema already provides.

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 verb 'Remove' and the resource 'user from a workspace', and explicitly distinguishes from 'delete_user' which removes from the organization. This differentiates from sibling tools.

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 explicitly tells when to use (remove user from workspace) and when not to (use delete_user for full removal). It names an alternative tool, though it could mention other related tools like 'update_workspace_member'.

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/s-b-e-n-s-o-n/portkey-admin-mcp'

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