Skip to main content
Glama

buddypress_delete_friendship

Remove a friendship connection in BuddyPress by specifying the friendship ID to manage community relationships.

Instructions

Delete a friendship

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesFriendship ID

Implementation Reference

  • Executes the buddypress_delete_friendship tool by sending a DELETE request to the BuddyPress API endpoint `/friends/${id}` using the shared `buddypressRequest` helper function.
    else if (name === 'buddypress_delete_friendship') {
      result = await buddypressRequest(`/friends/${args.id}`, 'DELETE');
    }
  • Defines the input schema for the tool, requiring a single 'id' parameter of type number representing the friendship ID.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'number', description: 'Friendship ID', required: true },
      },
      required: ['id'],
    },
  • src/index.ts:390-400 (registration)
    Registers the buddypress_delete_friendship tool in the global tools array used for listing available tools.
    {
      name: 'buddypress_delete_friendship',
      description: 'Delete a friendship',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'number', description: 'Friendship ID', required: true },
        },
        required: ['id'],
      },
    },
  • Helper function that performs authenticated HTTP requests to the BuddyPress REST API, used by all tools including buddypress_delete_friendship.
    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?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Delete a friendship' implies a destructive mutation, but it fails to describe any behavioral traits: whether deletion is permanent or reversible, what permissions are required, whether it affects related data (e.g., notifications, activities), what happens on success/failure, or any rate limits. This is inadequate for a destructive operation with zero annotation coverage.

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 maximally concise with a single three-word sentence that states the core action. There's no wasted language or unnecessary elaboration. While severely under-specified, what's present is efficiently structured and front-loaded.

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

Completeness1/5

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

For a destructive mutation tool with no annotations and no output schema, the description is completely inadequate. It doesn't explain what happens after deletion, what the response looks like, error conditions, or behavioral implications. Given the complexity of a friendship deletion operation in a social platform context, this minimal description leaves critical gaps for agent understanding.

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% with the single parameter 'id' documented as 'Friendship ID'. The description adds no parameter information beyond what the schema provides. Since the schema does the heavy lifting, the baseline score of 3 is appropriate - the description neither compensates nor detracts from parameter understanding.

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 'Delete a friendship' is a tautology that merely restates the tool name 'buddypress_delete_friendship'. It provides the verb 'delete' and resource 'friendship' but offers no additional specificity about what constitutes a friendship deletion operation. While it distinguishes from siblings like 'buddypress_create_friendship', it doesn't clarify scope or mechanism beyond the obvious.

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 absolutely no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., existing friendship ID), consequences of deletion, or relationships with sibling tools like 'buddypress_list_friends' for finding IDs. There's no indication of when-not-to-use scenarios or alternative approaches.

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