Skip to main content
Glama

buddypress_get_xprofile_group

Retrieve a specific BuddyPress extended profile field group by its ID, with an option to include associated fields in the response.

Instructions

Get a single XProfile field group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesField group ID
fetch_fieldsNoInclude fields in response

Implementation Reference

  • Handler function for the 'buddypress_get_xprofile_group' tool. Constructs query parameters for fetch_fields if provided, then calls the BuddyPress API to retrieve the XProfile field group by ID.
    else if (name === 'buddypress_get_xprofile_group') {
      const params = new URLSearchParams();
      if (args.fetch_fields !== undefined) params.append('fetch_fields', String(args.fetch_fields));
      result = await buddypressRequest(`/xprofile/groups/${args.id}?${params}`);
  • src/index.ts:303-314 (registration)
    Registration of the 'buddypress_get_xprofile_group' tool in the tools array, including name, description, and input schema definition.
    {
      name: 'buddypress_get_xprofile_group',
      description: 'Get a single XProfile field group',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'number', description: 'Field group ID', required: true },
          fetch_fields: { type: 'boolean', description: 'Include fields in response' },
        },
        required: ['id'],
      },
    },
  • Input schema definition for the 'buddypress_get_xprofile_group' tool, specifying required 'id' parameter and optional 'fetch_fields'.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'number', description: 'Field group ID', required: true },
        fetch_fields: { type: 'boolean', description: 'Include fields in response' },
      },
      required: ['id'],
  • Shared helper function 'buddypressRequest' used by all BuddyPress tools, including this one, to make authenticated API calls 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 full burden. It states a read operation ('Get'), implying it's non-destructive, but doesn't disclose behavioral traits like authentication requirements, error handling, rate limits, or response format. For a tool with no annotations, this leaves significant gaps in understanding how it behaves.

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 purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place.

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?

Given no annotations and no output schema, the description is minimal but adequate for a simple read tool. It covers the basic purpose but lacks details on behavior, error cases, or output structure. For a tool with 2 parameters and 100% schema coverage, it meets minimum viability but could be more informative about operational context.

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 clear descriptions for both parameters ('id' as field group ID, 'fetch_fields' to include fields). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate since the schema does the heavy lifting.

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 ('Get') and resource ('a single XProfile field group'), making the purpose unambiguous. It distinguishes from siblings like 'buddypress_list_xprofile_groups' by specifying 'single' versus list operations. However, it doesn't explicitly differentiate from 'buddypress_get_xprofile_field', which targets individual fields rather than groups.

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. The description doesn't mention prerequisites, such as needing a valid group ID, or contrast it with 'buddypress_list_xprofile_groups' for browsing groups. Usage is implied by the name and description but not explicitly stated.

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