Skip to main content
Glama

buddypress_get_group

Retrieve a specific BuddyPress group by its ID to access group details for community management tasks.

Instructions

Get a single group by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesGroup ID

Implementation Reference

  • The execution handler for the 'buddypress_get_group' tool. It retrieves the group by calling the BuddyPress REST API endpoint `/groups/${args.id}` using the shared `buddypressRequest` helper.
    else if (name === 'buddypress_get_group') {
      result = await buddypressRequest(`/groups/${args.id}`);
    }
  • src/index.ts:199-209 (registration)
    Tool registration in the tools array. Defines the name, description, and input schema for 'buddypress_get_group', which is returned by the ListTools handler.
    {
      name: 'buddypress_get_group',
      description: 'Get a single group by ID',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'number', description: 'Group ID', required: true },
        },
        required: ['id'],
      },
    },
  • Input schema definition for the tool, specifying that a numeric 'id' parameter is required.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'number', description: 'Group ID', required: true },
      },
      required: ['id'],
    },
  • Shared helper function used by all BuddyPress tools, including buddypress_get_group, 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?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it's a read operation ('Get'), implying non-destructive behavior, but doesn't specify authentication requirements, rate limits, error handling (e.g., what happens if the ID doesn't exist), or return format. For a tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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 four words, front-loading the core purpose with zero wasted language. Every word earns its place: 'Get' specifies the action, 'a single group' specifies the resource and scope, and 'by ID' hints at the parameter. This is a model of efficiency for simple retrieval tools.

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

Completeness3/5

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

For a simple read operation with one fully documented parameter and no output schema, the description is minimally adequate. It covers the basic purpose but lacks context about authentication, error handling, return structure, or differentiation from siblings. Without annotations or output schema, the agent must rely heavily on the tool name and parameter schema alone.

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 description mentions 'by ID' which aligns with the single 'id' parameter in the schema. With 100% schema description coverage (the schema fully documents the 'id' parameter as a required number), the description adds minimal value beyond what's already in the structured data. It doesn't provide additional context about ID format, validation, or examples.

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 ('Get') and resource ('a single group by ID'), making the purpose immediately understandable. It distinguishes from sibling tools like 'buddypress_list_groups' by specifying retrieval of a single item rather than a list. However, it doesn't explicitly differentiate from other 'get' tools like 'buddypress_get_activity' or 'buddypress_get_member' beyond the resource name.

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 sibling tools like 'buddypress_list_groups' for listing multiple groups or 'buddypress_get_member' for different resource types. There's no context about prerequisites, error conditions, or typical use cases, leaving the agent to infer usage from the tool name alone.

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