Skip to main content
Glama
Buu-AI

Buu AI MCP Server

team_create

Create a new team for the logged-in user by specifying a team name using the input schema, simplifying team management on the Buu AI MCP Server.

Instructions

[PRIVATE] Create a new team for the logged-in user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the new team

Implementation Reference

  • The asynchronous handler function for the 'team_create' tool that executes the GraphQL mutation to create a new team and handles the response or error.
    async ({ name }) => {
      try {
        const response = await client.request(createTeamMutation, { name });
        return { content: [{ type: 'text', text: JSON.stringify(response) }] };
      } catch (error) {
        console.error('Error calling team_create:', error);
        return {
          isError: true,
          content: [{ type: 'text', text: `Error: Failed to create team. ${error}` }],
        };
      }
    }
  • Zod input schema for the 'team_create' tool defining the required 'name' parameter.
    {
      name: z.string().describe('The name of the new team'),
    },
  • Registration of the 'team_create' tool using McpServer.tool method within registerTeamTools function.
    server.tool(
      'team_create',
      '[PRIVATE] Create a new team for the logged-in user.',
      {
        name: z.string().describe('The name of the new team'),
      },
      async ({ name }) => {
        try {
          const response = await client.request(createTeamMutation, { name });
          return { content: [{ type: 'text', text: JSON.stringify(response) }] };
        } catch (error) {
          console.error('Error calling team_create:', error);
          return {
            isError: true,
            content: [{ type: 'text', text: `Error: Failed to create team. ${error}` }],
          };
        }
      }
    );
  • GraphQL mutation query definition used by the team_create handler to create a new team.
    const createTeamMutation = gql`
      mutation CreateTeam($name: String!) {
        createTeam(name: $name) {
          ... 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)
    Top-level call to registerTeamTools function, which registers the 'team_create' tool along with other team tools.
    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