team_update_member_role
Assign or modify a team member's role by specifying the member's address and their new role within Buu AI MCP Server.
Instructions
[PRIVATE] Update the role of a team member.
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": {
"member": "<member>",
"newRole": "<newRole>"
},
"name": "team_update_member_role"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| member | Yes | Address of the team member | |
| newRole | Yes | New role for the team member |
Implementation Reference
- src/tools/TeamTools.ts:304-318 (handler)The handler function that executes the tool logic by invoking the GraphQL mutation to update a team member's role.
async ({ member, newRole }) => { try { const response = await client.request(updateTeamMemberRoleMutation, { member, newRole, }); return { content: [{ type: 'text', text: JSON.stringify(response) }] }; } catch (error) { console.error('Error calling team_update_member_role:', error); return { isError: true, content: [{ type: 'text', text: `Error: Failed to update member role. ${error}` }], }; } } - src/tools/TeamTools.ts:300-303 (schema)Zod input schema defining parameters: member (address) and newRole.
{ member: z.string().describe('Address of the team member'), newRole: z.string().describe('New role for the team member'), }, - src/tools/TeamTools.ts:297-319 (registration)Registration of the 'team_update_member_role' tool on the MCP server, including schema and handler.
server.tool( 'team_update_member_role', '[PRIVATE] Update the role of a team member.', { member: z.string().describe('Address of the team member'), newRole: z.string().describe('New role for the team member'), }, async ({ member, newRole }) => { try { const response = await client.request(updateTeamMemberRoleMutation, { member, newRole, }); return { content: [{ type: 'text', text: JSON.stringify(response) }] }; } catch (error) { console.error('Error calling team_update_member_role:', error); return { isError: true, content: [{ type: 'text', text: `Error: Failed to update member role. ${error}` }], }; } } ); - src/tools/TeamTools.ts:119-145 (helper)GraphQL mutation query used by the handler to perform the role update.
const updateTeamMemberRoleMutation = gql` mutation UpdateTeamMemberRole($newRole: TeamRole!, $member: String!) { updateTeamMemberRole(newRole: $newRole, member: $member) { ... on Team { _id type name creator wallet members { address role status } available pending confirmed updatedAt createdAt } ... on HandledError { code message } } } `; - src/index.ts:49-49 (registration)Invocation of registerTeamTools which registers the team_update_member_role tool among others.
registerTeamTools(server, buuServerClient);