Skip to main content
Glama

buddypress_list_activities

Retrieve and filter BuddyPress activity stream items, including user posts, group updates, and comments, using parameters like user ID, group ID, search terms, and scope options.

Instructions

List activity stream items with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default: 1)
per_pageNoItems per page (default: 20)
searchNoSearch term
user_idNoFilter by user ID
group_idNoFilter by group ID
scopeNoActivity scope (all, friends, groups, favorites, mentions)
display_commentsNoInclude comments

Implementation Reference

  • Executes the buddypress_list_activities tool by constructing URL query parameters from input arguments and making an authenticated GET request to the BuddyPress /activity endpoint.
    if (name === 'buddypress_list_activities') {
      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_id) params.append('user_id', String(args.user_id));
      if (args.group_id) params.append('group_id', String(args.group_id));
      if (args.scope) params.append('scope', String(args.scope));
      if (args.display_comments !== undefined) params.append('display_comments', String(args.display_comments));
      result = await buddypressRequest(`/activity?${params}`);
  • Defines the input schema for the buddypress_list_activities tool, specifying optional parameters for pagination, search, and filtering activities.
    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_id: { type: 'number', description: 'Filter by user ID' },
        group_id: { type: 'number', description: 'Filter by group ID' },
        scope: { type: 'string', description: 'Activity scope (all, friends, groups, favorites, mentions)' },
        display_comments: { type: 'boolean', description: 'Include comments' },
      },
    },
  • src/index.ts:51-66 (registration)
    Registers the buddypress_list_activities tool in the tools array used by the MCP server for tool listing and execution dispatching.
    {
      name: 'buddypress_list_activities',
      description: 'List activity stream items 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_id: { type: 'number', description: 'Filter by user ID' },
          group_id: { type: 'number', description: 'Filter by group ID' },
          scope: { type: 'string', description: 'Activity scope (all, friends, groups, favorites, mentions)' },
          display_comments: { type: 'boolean', description: 'Include comments' },
        },
      },
    },
  • Shared helper function for making authenticated HTTP requests to the BuddyPress REST API, used by all BuddyPress tools including buddypress_list_activities.
    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, the description carries full burden but provides minimal behavioral context. It implies a read-only operation through 'List' but doesn't explicitly state safety, permissions, rate limits, pagination behavior, or what happens with filters. The agent must infer behavior from the name and schema alone.

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—'List activity stream items with optional filters' directly conveys core functionality. It's appropriately sized and front-loaded, though more detail could improve other dimensions.

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 and no output schema, the description is incomplete for a tool with 7 parameters and list functionality. It lacks details on return format, error handling, authentication, and behavioral traits, leaving significant gaps for an AI agent to operate effectively.

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 parameters are well-documented in the schema. The description adds marginal value by mentioning 'optional filters,' which hints at the filtering parameters but doesn't elaborate beyond what the schema provides. Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('activity stream items') with scope ('with optional filters'). It distinguishes from siblings like 'buddypress_get_activity' (singular) and 'buddypress_create_activity' (write operation), but doesn't explicitly mention pagination or differentiate from other list tools like 'buddypress_list_members' beyond the resource type.

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 on when to use this tool versus alternatives is provided. It doesn't mention when to choose this over 'buddypress_get_activity' for single items or other list tools for different resources, nor does it specify prerequisites like authentication needs or context for filtering.

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