n8n_update_user_role
Modify user permissions in n8n by changing their assigned role. Specify the user ID and new role to update access levels for workflow management and administrative tasks.
Instructions
Update a user's role
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"role": "<role>"
},
"name": "n8n_update_user_role"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | User ID | |
| role | Yes | New role |
Implementation Reference
- src/n8n-client.ts:230-233 (handler)The actual API call to n8n to update a user's role.
async updateUserRole(id: string, role: string): Promise<any> { const response = await this.client.patch(`/users/${id}/role`, { role }); return response.data; } - src/index.ts:806-817 (registration)The MCP tool definition (schema and metadata) for n8n_update_user_role.
{ name: 'n8n_update_user_role', description: 'Update a user\'s role', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'User ID' }, role: { type: 'string', description: 'New role' }, }, required: ['id', 'role'], }, }, - src/index.ts:324-330 (handler)The MCP tool handler in index.ts that processes the request and calls the n8nClient method.
case 'n8n_update_user_role': { if (!args?.id || !args?.role) throw new Error('id and role are required'); const result = await n8nClient.updateUserRole(args.id as string, args.role as string); return { content: [{ type: 'text', text: formatResponse(result) }], }; }