Skip to main content
Glama

buddypress_list_notifications

Retrieve user notifications from BuddyPress sites to manage community engagement and track unread alerts using filtering options.

Instructions

List notifications

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idNoUser ID to get notifications for
is_newNoFilter by unread status
pageNoPage number (default: 1)
per_pageNoItems per page (default: 20)

Implementation Reference

  • Executes the buddypress_list_notifications tool by constructing URLSearchParams from input arguments (user_id, is_new, page, per_page) and calling the shared buddypressRequest helper to fetch from the BuddyPress /notifications API endpoint.
    else if (name === 'buddypress_list_notifications') {
      const params = new URLSearchParams();
      if (args.user_id) params.append('user_id', String(args.user_id));
      if (args.is_new !== undefined) params.append('is_new', String(args.is_new));
      if (args.page) params.append('page', String(args.page));
      if (args.per_page) params.append('per_page', String(args.per_page));
      result = await buddypressRequest(`/notifications?${params}`);
    }
  • src/index.ts:455-467 (registration)
    Registers the buddypress_list_notifications tool in the tools array, including name, description, and inputSchema for MCP protocol.
    {
      name: 'buddypress_list_notifications',
      description: 'List notifications',
      inputSchema: {
        type: 'object',
        properties: {
          user_id: { type: 'number', description: 'User ID to get notifications for' },
          is_new: { type: 'boolean', description: 'Filter by unread status' },
          page: { type: 'number', description: 'Page number (default: 1)' },
          per_page: { type: 'number', description: 'Items per page (default: 20)' },
        },
      },
    },
  • Defines the input schema for the buddypress_list_notifications tool, specifying optional parameters for filtering and pagination.
    inputSchema: {
      type: 'object',
      properties: {
        user_id: { type: 'number', description: 'User ID to get notifications for' },
        is_new: { type: 'boolean', description: 'Filter by unread status' },
        page: { type: 'number', description: 'Page number (default: 1)' },
        per_page: { type: 'number', description: 'Items per page (default: 20)' },
      },
    },
  • Shared helper function that makes authenticated HTTP requests to the BuddyPress REST API, used by the handler to fetch notifications.
    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();
    }
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'List notifications' implies a read-only operation but doesn't specify authentication requirements, rate limits, pagination behavior (beyond what's in schema), return format, or whether it's safe to call repeatedly. For a tool with zero annotation coverage, this is inadequate.

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 extremely concise at just two words. While it's under-specified, it's not verbose or poorly structured. Every word earns its place, and there's no wasted text.

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 the complexity (list operation with 4 parameters), no annotations, and no output schema, the description is incomplete. It doesn't explain what notifications are, how they're structured, what the return format looks like, or any behavioral considerations. For a tool in this context, more information is needed.

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 all parameters are documented in the schema. The description adds no additional meaning about parameters beyond what the schema provides. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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

Purpose2/5

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

The description 'List notifications' is a tautology that restates the tool name 'buddypress_list_notifications'. It doesn't specify what kind of notifications (e.g., BuddyPress social notifications), what resource they belong to, or how this differs from sibling tools like 'buddypress_get_notification' (singular vs. list). The purpose is minimally stated but lacks differentiation.

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

Usage Guidelines1/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. There are multiple related tools like 'buddypress_get_notification' (singular), 'buddypress_update_notification', and 'buddypress_delete_notification', but the description offers no context about when this list operation is appropriate versus those other operations.

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