Skip to main content
Glama

buddypress_update_notification

Mark BuddyPress notifications as read or unread to manage user alerts and maintain organized community engagement.

Instructions

Update notification (mark as read/unread)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNotification ID
is_newNoMark as unread (true) or read (false)

Implementation Reference

  • The execution handler for the 'buddypress_update_notification' tool. It extracts the notification ID and body (containing 'is_new' flag) from arguments and sends a PUT request to the BuddyPress notifications endpoint.
    else if (name === 'buddypress_update_notification') {
      const { id, ...body } = args as any;
      result = await buddypressRequest(`/notifications/${id}`, 'PUT', body);
  • src/index.ts:479-490 (registration)
    Registration of the 'buddypress_update_notification' tool in the tools array, including name, description, and input schema definition.
    {
      name: 'buddypress_update_notification',
      description: 'Update notification (mark as read/unread)',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'number', description: 'Notification ID', required: true },
          is_new: { type: 'boolean', description: 'Mark as unread (true) or read (false)' },
        },
        required: ['id'],
      },
    },
  • Input schema definition for validating tool arguments: requires notification ID, optional is_new boolean to mark read/unread.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'number', description: 'Notification ID', required: true },
        is_new: { type: 'boolean', description: 'Mark as unread (true) or read (false)' },
      },
      required: ['id'],
    },
  • Shared helper function used by all BuddyPress tools, including this one, to make authenticated API requests.
    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 but only states the basic operation. It doesn't disclose behavioral traits such as permission requirements, whether the update is reversible, rate limits, or what happens if the ID is invalid. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with a single phrase, front-loading the key action. It avoids unnecessary words, but could be slightly more informative without losing efficiency. Every word earns its place, though it borders on under-specification.

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 of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral context, error handling, or return values, which are crucial for safe and effective use. The schema covers parameters well, but overall guidance is insufficient.

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 ('id' and 'is_new') clearly. The description adds no additional meaning beyond what the schema provides, such as explaining parameter interactions or constraints. 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.

Purpose3/5

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

The description states the action ('Update notification') and the specific operation ('mark as read/unread'), which is clear. However, it doesn't distinguish this from sibling tools like 'buddypress_get_notification' or 'buddypress_delete_notification', leaving the scope vague regarding what 'update' entails beyond read status changes.

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. For example, it doesn't mention prerequisites like needing an existing notification ID or differentiate from 'buddypress_delete_notification' for removal. The description implies usage for read/unread toggling but offers no explicit context or exclusions.

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