Skip to main content
Glama
Buu-AI

Buu AI MCP Server

team_get_all

Retrieve all teams for the current user with customizable pagination and filters to streamline team management in the Buu AI MCP Server.

Instructions

[PRIVATE] Get all teams for the current user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoFilter criteria to narrow down thread results
paginationNoPagination settings for querying threads

Implementation Reference

  • Handler function that executes the 'team_get_all' tool logic by calling the GraphQL 'getUserTeamsQuery' with optional pagination and filters.
    async ({ pagination, filters }) => {
      try {
        const response = await client.request(getUserTeamsQuery, { pagination, filters });
        return { content: [{ type: 'text', text: JSON.stringify(response) }] };
      } catch (error) {
        console.error('Error calling team_get_all:', error);
        return {
          isError: true,
          content: [{ type: 'text', text: `Error: Failed to retrieve all teams. ${error}` }],
        };
      }
    }
  • Input schema for the 'team_get_all' tool, defining optional pagination and filters using Zod.
    {
      pagination: z.any().optional().describe('Pagination settings for querying threads'),
      filters: z.any().optional().describe('Filter criteria to narrow down thread results'),
    },
  • Registration of the 'team_get_all' MCP tool using server.tool() with description, input schema, and handler.
      'team_get_all',
      '[PRIVATE] Get all teams for the current user.',
      {
        pagination: z.any().optional().describe('Pagination settings for querying threads'),
        filters: z.any().optional().describe('Filter criteria to narrow down thread results'),
      },
      async ({ pagination, filters }) => {
        try {
          const response = await client.request(getUserTeamsQuery, { pagination, filters });
          return { content: [{ type: 'text', text: JSON.stringify(response) }] };
        } catch (error) {
          console.error('Error calling team_get_all:', error);
          return {
            isError: true,
            content: [{ type: 'text', text: `Error: Failed to retrieve all teams. ${error}` }],
          };
        }
      }
    );
  • GraphQL query definition 'getUserTeamsQuery' used by the team_get_all handler to fetch user's teams with pagination and filters.
    const getUserTeamsQuery = gql`
      query TeamPage($pagination: Pagination, $filters: TeamFilter) {
        getUserTeams(pagination: $pagination, filters: $filters) {
          ... on TeamPage {
            items {
              _id
              type
              name
              creator
              wallet
              members {
                address
                role
                status
              }
              available
              pending
              confirmed
              updatedAt
              createdAt
            }
            metadata {
              limit
              offset
              orderBy
              orderDirection
              numElements
              total
              page
              pages
            }
          }
          ... on HandledError {
            code
            message
          }
        }
      }
    `;
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions '[PRIVATE]' which hints at access restrictions, but doesn't clarify authentication needs, rate limits, pagination behavior (despite a pagination parameter), or what 'all teams' entails (e.g., scope, limits). The description lacks details on behavioral traits beyond the basic operation.

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?

The description is a single, efficient sentence with zero waste. It front-loads key information ('[PRIVATE] Get all teams') and includes necessary scope ('for the current user'). Every word earns its place, making it appropriately sized and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a tool with two parameters (filters and pagination), the description is incomplete. It doesn't explain return values, error handling, or how parameters affect results (e.g., filter usage). For a list operation with potential complexity, more context is needed to guide effective use.

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 description coverage is 100%, so the schema already documents both parameters ('filters' and 'pagination'). The description adds no parameter-specific information beyond what the schema provides, such as filter examples or pagination defaults. With high schema coverage, the baseline is 3, as the description doesn't compensate with additional semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get all teams') and resource ('teams'), with the scope 'for the current user' providing specific context. It distinguishes from sibling tools like 'team_get' (single team) and 'team_create' (creation), but doesn't explicitly mention these alternatives. The '[PRIVATE]' prefix adds context but doesn't fully articulate differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing all teams for the current user, but provides no explicit guidance on when to use this versus alternatives like 'team_get' (single team) or 'genrequest_get_all' (different resource). No exclusions or prerequisites are mentioned, leaving usage context somewhat implied rather than clearly defined.

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

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

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