Skip to main content
Glama

buddypress_list_xprofile_groups

Retrieve BuddyPress extended profile field groups to organize and manage user profile data. Optionally include individual fields for comprehensive profile structure access.

Instructions

List XProfile field groups

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fetch_fieldsNoInclude fields in response

Implementation Reference

  • Handler that checks the tool name and makes an authenticated GET request to the BuddyPress XProfile groups endpoint with optional fetch_fields parameter.
    else if (name === 'buddypress_list_xprofile_groups') { const params = new URLSearchParams(); if (args.fetch_fields !== undefined) params.append('fetch_fields', String(args.fetch_fields)); result = await buddypressRequest(`/xprofile/groups?${params}`); }
  • src/index.ts:293-302 (registration)
    Registration of the tool in the tools array, including name, description, and input schema definition.
    { name: 'buddypress_list_xprofile_groups', description: 'List XProfile field groups', inputSchema: { type: 'object', properties: { fetch_fields: { type: 'boolean', description: 'Include fields in response' }, }, }, },
  • Input schema defining the optional fetch_fields boolean parameter.
    inputSchema: { type: 'object', properties: { fetch_fields: { type: 'boolean', description: 'Include fields in response' }, }, },
  • Shared helper function used by all BuddyPress tools 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(); }

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