Skip to main content
Glama
Buu-AI

Buu AI MCP Server

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memberYesAddress of the team member
newRoleYesNew role for the team member

Implementation Reference

  • 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}` }],
        };
      }
    }
  • 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'),
    },
  • 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}` }],
          };
        }
      }
    );
  • 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);

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/Buu-AI/buu-mcp-server'

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