Skip to main content
Glama

buddypress_remove_group_member

Remove a user from a BuddyPress group by specifying group ID and user ID for community management.

Instructions

Remove a member from a group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idYesGroup ID
user_idYesUser ID

Implementation Reference

  • Handler logic for the buddypress_remove_group_member tool. Destructures group_id and user_id from input arguments and performs a DELETE request to the BuddyPress API endpoint to remove the member from the group.
    else if (name === 'buddypress_remove_group_member') {
      const { group_id, user_id } = args as any;
      result = await buddypressRequest(`/groups/${group_id}/members/${user_id}`, 'DELETE');
    }
  • src/index.ts:279-290 (registration)
    Registration of the buddypress_remove_group_member tool in the tools array. Defines the tool name, description, and input schema requiring group_id and user_id.
    {
      name: 'buddypress_remove_group_member',
      description: 'Remove a member from a group',
      inputSchema: {
        type: 'object',
        properties: {
          group_id: { type: 'number', description: 'Group ID', required: true },
          user_id: { type: 'number', description: 'User ID', required: true },
        },
        required: ['group_id', 'user_id'],
      },
    },
  • Shared helper function buddypressRequest used by the tool handler to make authenticated HTTP 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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a destructive mutation ('Remove'), but lacks details on permissions required, whether the action is reversible, effects on group membership, or error conditions. This is a significant gap for a mutation tool without 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 a single, efficient sentence with zero waste, front-loading the core action. It uses minimal words to convey the essential purpose without redundancy or unnecessary elaboration.

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?

For a destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context such as behavioral traits, return values, error handling, or usage guidelines, leaving significant gaps for an AI agent to understand and invoke the tool correctly.

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%, clearly documenting both parameters (group_id and user_id) as required numbers. The description adds no additional meaning beyond the schema, such as format examples or constraints, but the schema adequately defines the inputs, meeting the baseline for high coverage.

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 action ('Remove') and target ('a member from a group'), providing specific verb+resource. It distinguishes from siblings like 'buddypress_add_group_member' by specifying removal rather than addition, though it doesn't explicitly mention all alternatives like 'buddypress_delete_member' which might serve different purposes.

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 such as 'buddypress_delete_member' or 'buddypress_update_member', nor does it mention prerequisites like permissions or context. The description only states what it does without indicating appropriate scenarios 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