Skip to main content
Glama

buddypress_delete_activity

Remove an activity item from a BuddyPress community site by specifying its ID to manage content and maintain community standards.

Instructions

Delete an activity item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesActivity ID

Implementation Reference

  • Handler function that executes the deletion of the specified activity item by making a DELETE request to the BuddyPress /activity/{id} endpoint using the shared buddypressRequest helper.
    else if (name === 'buddypress_delete_activity') {
      result = await buddypressRequest(`/activity/${args.id}`, 'DELETE');
    }
  • Input schema defining the required 'id' parameter (number) for the activity to delete.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'number', description: 'Activity ID', required: true },
      },
      required: ['id'],
    },
  • src/index.ts:106-116 (registration)
    Registration of the tool in the tools array, including name, description, and input schema, which is returned by the ListTools handler.
    {
      name: 'buddypress_delete_activity',
      description: 'Delete an activity item',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'number', description: 'Activity ID', required: true },
        },
        required: ['id'],
      },
    },
  • Shared helper function used by all BuddyPress tools, including this one, to make authenticated API 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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Delete' implies a destructive mutation, the description doesn't specify whether this operation is reversible, what permissions are required, what happens to associated data, or what the response looks like (e.g., success/failure indicators). For a destructive tool with zero annotation coverage, this is a significant gap in transparency.

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 directly states the tool's function without unnecessary words. It's front-loaded with the core action ('Delete'), making it easy to parse. There's zero waste or redundancy, which is ideal for conciseness.

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 tool's destructive nature, lack of annotations, and absence of an output schema, the description is incomplete. It doesn't address critical context such as error handling, return values, or behavioral implications (e.g., permanence of deletion). For a mutation tool with no structured safety or output information, this minimal description is inadequate.

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?

The input schema has 100% description coverage, with the 'id' parameter clearly documented as 'Activity ID'. The description doesn't add any meaning beyond this, as it doesn't explain what constitutes a valid ID or provide examples. Given the high schema coverage, the baseline score of 3 is appropriate—the schema does the heavy lifting, and the description doesn't compensate or add value.

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 ('Delete') and resource ('an activity item'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'buddypress_create_activity' and 'buddypress_update_activity' by specifying deletion rather than creation or modification. However, it doesn't specify what an 'activity item' entails beyond the name, leaving some ambiguity about the resource scope.

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 prerequisites (e.g., needing an existing activity ID), exclusions (e.g., not for deleting other resource types), or comparisons to siblings like 'buddypress_delete_group' or 'buddypress_delete_member'. This lack of context could lead to misuse by an AI agent.

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