Skip to main content
Glama

update_mcp_server_user_access

Immediately grant or revoke user access to an MCP server. Overrides default access for selected users.

Instructions

Grant or revoke individual user access to an MCP server. Changes take effect immediately and override the default access setting for the selected users; use list_mcp_server_user_access first if you need the current state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe MCP server ID or slug
usersYesArray of user access updates

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 MCP tool handler for 'update_mcp_server_user_access'. Receives params (id, users), calls the service layer method, and returns a success message.
    server.tool(
    	"update_mcp_server_user_access",
    	"Grant or revoke individual user access to an MCP server. Changes take effect immediately and override the default access setting for the selected users; use list_mcp_server_user_access first if you need the current state.",
    	MCP_SERVERS_TOOL_SCHEMAS.updateMcpServerUserAccess,
    	async (params) => {
    		await service.mcpServers.updateMcpServerUserAccess(params.id, {
    			user_access: params.users,
    		});
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							message: `Successfully updated user access for MCP server "${params.id}"`,
    							success: true,
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
  • Zod schema definition for updateMcpServerUserAccess tool input: id (string) and users (array of {user_id, enabled} with min 1 item).
    updateMcpServerUserAccess: {
    	id: z.string().describe("The MCP server ID or slug"),
    	users: z
    		.array(
    			z.object({
    				user_id: z.string().describe("User ID"),
    				enabled: z.boolean().describe("Whether user has access"),
    			}),
    		)
    		.min(1)
    		.describe("Array of user access updates"),
    },
  • Tool registration via server.tool() using name 'update_mcp_server_user_access', description, schema, and handler.
    server.tool(
    	"update_mcp_server_user_access",
    	"Grant or revoke individual user access to an MCP server. Changes take effect immediately and override the default access setting for the selected users; use list_mcp_server_user_access first if you need the current state.",
    	MCP_SERVERS_TOOL_SCHEMAS.updateMcpServerUserAccess,
    	async (params) => {
    		await service.mcpServers.updateMcpServerUserAccess(params.id, {
    			user_access: params.users,
    		});
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							message: `Successfully updated user access for MCP server "${params.id}"`,
    							success: true,
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
  • Service method that executes the HTTP PUT request to /mcp-servers/{id}/user-access with the UpdateMcpServerUserAccessRequest payload.
    async updateMcpServerUserAccess(
    	id: string,
    	data: UpdateMcpServerUserAccessRequest,
    ): Promise<{ success: boolean }> {
    	await this.put(
    		`/mcp-servers/${this.encodePathSegment(id)}/user-access`,
    		data,
    	);
    	return { success: true };
    }
  • TypeScript interface UpdateMcpServerUserAccessRequest defining the request body: user_access array of {user_id, enabled}.
    export interface UpdateMcpServerUserAccessRequest {
    	user_access: Array<{
    		user_id: string;
    		enabled: boolean;
    	}>;
    }
Behavior4/5

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

Annotations indicate a write operation with no destructive or idempotent guarantees. The description adds that changes 'take effect immediately' and 'override the default access setting', providing useful behavioral context beyond annotations.

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 concise sentences: the first states the core action, the second adds a crucial usage hint. No wasted words, front-loaded with purpose.

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?

Covers the action, immediate effect, override behavior, and a recommended precursor call. With an output schema available (as noted in context signals), the description is sufficient for a simple mutation tool, though edge cases like non-existent users are not addressed.

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 clear parameter descriptions. The description does not add significant new meaning to the parameters beyond reiterating their purpose, so 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 action ('grant or revoke individual user access') and the resource ('MCP server'). It distinguishes itself from sibling tools like list_mcp_server_user_access and update_mcp_server by focusing on per-user access overrides.

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?

Provides explicit guidance to use list_mcp_server_user_access first for current state, and explains that changes override default access. While it doesn't cover when not to use it, the alternative recommendation is strong.

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