Skip to main content
Glama

buddypress_list_components

View active BuddyPress components to understand which community features are currently enabled on your WordPress site.

Instructions

List active BuddyPress components

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'buddypress_list_components' tool. Executes by calling the shared 'buddypressRequest' helper with the '/components' endpoint to retrieve active BuddyPress components.
    else if (name === 'buddypress_list_components') { result = await buddypressRequest('/components'); }
  • src/index.ts:505-511 (registration)
    Tool registration in the 'tools' array, defining the name, description, and empty input schema (no parameters required). This is used by the ListToolsRequestHandler.
    name: 'buddypress_list_components', description: 'List active BuddyPress components', inputSchema: { type: 'object', properties: {}, }, },
  • Input schema definition for the tool, specifying an object with no required properties.
    inputSchema: { type: 'object', properties: {}, },
  • Shared helper function used by all BuddyPress tools, including this one, 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(); }

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