Skip to main content
Glama

buddypress_list_members

Retrieve BuddyPress community members with filters for search, member type, user IDs, and pagination to manage and analyze user data.

Instructions

List BuddyPress members with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default: 1)
per_pageNoItems per page (default: 20)
searchNoSearch term
user_idsNoComma-separated user IDs
member_typeNoMember type
excludeNoComma-separated user IDs to exclude

Implementation Reference

  • Executes the buddypress_list_members tool by constructing URLSearchParams from input arguments (page, per_page, search, user_ids as include, member_type, exclude) and calling the buddypressRequest helper with GET to /members endpoint.
    else if (name === 'buddypress_list_members') {
      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.user_ids) params.append('include', String(args.user_ids));
      if (args.member_type) params.append('member_type', String(args.member_type));
      if (args.exclude) params.append('exclude', String(args.exclude));
      result = await buddypressRequest(`/members?${params}`);
    }
  • src/index.ts:130-144 (registration)
    Registers the buddypress_list_members tool in the tools array, including name, description, and inputSchema definition used for tool listing and validation.
    {
      name: 'buddypress_list_members',
      description: 'List BuddyPress members 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' },
          user_ids: { type: 'string', description: 'Comma-separated user IDs' },
          member_type: { type: 'string', description: 'Member type' },
          exclude: { type: 'string', description: 'Comma-separated user IDs to exclude' },
        },
      },
    },
  • Input schema definition for the buddypress_list_members tool, specifying properties for pagination, search, filtering by user IDs, member type, and exclusion.
    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' },
        user_ids: { type: 'string', description: 'Comma-separated user IDs' },
        member_type: { type: 'string', description: 'Member type' },
        exclude: { type: 'string', description: 'Comma-separated user IDs to exclude' },
      },
    },
  • Shared helper function used by all BuddyPress tools, including buddypress_list_members, to make authenticated HTTP requests to the BuddyPress REST API.
    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?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'List' implies a read-only operation, it doesn't explicitly state this or mention any side effects. There's no information about pagination behavior (beyond what's in the schema), rate limits, authentication requirements, or what the return format looks like. The description adds minimal behavioral context beyond the basic action.

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 communicates the core purpose immediately. Every word earns its place - 'List' (action), 'BuddyPress members' (resource), 'optional filters' (capability). There's no wasted verbiage or unnecessary elaboration.

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

Completeness3/5

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

For a list operation with 6 well-documented parameters but no output schema and no annotations, the description is minimally adequate. It identifies the tool as a list operation with filtering capabilities, which matches the parameter set. However, it doesn't address what the output looks like, pagination behavior, or how this differs from similar list operations among the siblings. The completeness is borderline for a read-only list tool.

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 all 6 parameters thoroughly. The description mentions 'optional filters' which aligns with parameters like search, user_ids, member_type, and exclude, but doesn't add any meaningful semantic context beyond what the schema provides. With complete schema coverage, the baseline score of 3 is appropriate.

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 members'), making the purpose immediately understandable. It distinguishes from siblings like 'buddypress_get_member' (singular) and 'buddypress_list_group_members' (group-specific), though it doesn't explicitly mention these distinctions. The mention of 'optional filters' adds useful scope information.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'buddypress_list_members' over 'buddypress_get_member' (for single member) or 'buddypress_list_group_members' (for members within a group). There's also no information about prerequisites, authentication requirements, or typical use cases.

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