Skip to main content
Glama

buddypress_list_groups

Retrieve BuddyPress groups using filters like status, user membership, or search terms to manage community groups through the BuddyPress MCP Server.

Instructions

List BuddyPress groups with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default: 1)
per_pageNoItems per page (default: 20)
searchNoSearch term
statusNoGroup status (public, private, hidden)
user_idNoFilter groups by user membership
group_typeNoGroup type

Implementation Reference

  • Handler logic for executing the buddypress_list_groups tool. Constructs URLSearchParams from input arguments and calls the shared buddypressRequest helper to GET /groups endpoint.
    else if (name === 'buddypress_list_groups') {
      const params = new URLSearchParams();
      if (args.page) params.append('page', String(args.page));
      if (args.per_page) params.append('per_page', String(args.per_page));
      if (args.search) params.append('search', String(args.search));
      if (args.status) params.append('status', String(args.status));
      if (args.user_id) params.append('user_id', String(args.user_id));
      if (args.group_type) params.append('group_type', String(args.group_type));
      result = await buddypressRequest(`/groups?${params}`);
    }
  • Input schema defining the parameters for the buddypress_list_groups tool, including pagination, search, status, user filter, and group type.
    inputSchema: {
      type: 'object',
      properties: {
        page: { type: 'number', description: 'Page number (default: 1)' },
        per_page: { type: 'number', description: 'Items per page (default: 20)' },
        search: { type: 'string', description: 'Search term' },
        status: { type: 'string', description: 'Group status (public, private, hidden)' },
        user_id: { type: 'number', description: 'Filter groups by user membership' },
        group_type: { type: 'string', description: 'Group type' },
      },
    },
  • src/index.ts:184-198 (registration)
    Registration of the buddypress_list_groups tool in the global tools array, which is returned by the ListToolsRequestSchema handler.
    {
      name: 'buddypress_list_groups',
      description: 'List BuddyPress groups with optional filters',
      inputSchema: {
        type: 'object',
        properties: {
          page: { type: 'number', description: 'Page number (default: 1)' },
          per_page: { type: 'number', description: 'Items per page (default: 20)' },
          search: { type: 'string', description: 'Search term' },
          status: { type: 'string', description: 'Group status (public, private, hidden)' },
          user_id: { type: 'number', description: 'Filter groups by user membership' },
          group_type: { type: 'string', description: 'Group type' },
        },
      },
    },
  • Shared helper utility function for making authenticated requests to BuddyPress REST API, used by all tool handlers including buddypress_list_groups.
    async function buddypressRequest(
      endpoint: string,
      method: string = 'GET',
      body?: any
    ): Promise<any> {
      const url = `${BUDDYPRESS_URL}/wp-json/buddypress/v2${endpoint}`;
      const auth = Buffer.from(`${BUDDYPRESS_USERNAME}:${BUDDYPRESS_PASSWORD}`).toString('base64');
    
      const options: any = {
        method,
        headers: {
          'Authorization': `Basic ${auth}`,
          'Content-Type': 'application/json',
        },
      };
    
      if (body && method !== 'GET') {
        options.body = JSON.stringify(body);
      }
    
      const response = await fetch(url, options);
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`BuddyPress API Error (${response.status}): ${errorText}`);
      }
    
      return await response.json();
    }
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 'optional filters' but doesn't disclose behavioral traits such as pagination defaults, rate limits, authentication needs, or what the output looks like (e.g., list format, error handling). For a read operation with 6 parameters, this leaves significant gaps in understanding tool behavior.

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 that front-loads the core purpose ('List BuddyPress groups') and adds essential scope ('with optional filters'). There is zero waste, making it easy to parse and understand quickly.

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 6 parameters, the description is incomplete. It lacks details on behavioral aspects (e.g., pagination behavior, error cases) and output format, which are critical for a list operation with filtering. The high schema coverage helps, but overall context is insufficient for effective tool 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%, with all 6 parameters well-documented in the schema (e.g., 'page' as page number, 'status' with allowed values). The description adds minimal value beyond the schema by noting 'optional filters', but doesn't explain parameter interactions or provide additional context, meeting the baseline for high schema coverage.

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 verb ('List') and resource ('BuddyPress groups') with scope ('with optional filters'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'buddypress_get_group' (singular) or 'buddypress_list_members', but the resource specificity is adequate.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. With siblings like 'buddypress_get_group' (singular retrieval) and 'buddypress_list_group_members' (list members of a group), the description lacks context for selection, offering only basic functionality without exclusions or prerequisites.

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

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/vapvarun/buddypress-mcp'

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