Skip to main content
Glama

buddypress_list_components

Retrieve active BuddyPress components to manage community features like groups, profiles, and activities on your WordPress site.

Instructions

List active BuddyPress components

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Schema definition for the 'buddypress_list_components' tool in the tools array, specifying name, description, and empty input schema (no parameters required). This is used for tool listing and validation.
    { name: 'buddypress_list_components', description: 'List active BuddyPress components', inputSchema: { type: 'object', properties: {}, }, },
  • Handler implementation in the tool execution switch statement. Executes by calling the BuddyPress API endpoint '/components' via the buddypressRequest helper to list active components.
    else if (name === 'buddypress_list_components') { result = await buddypressRequest('/components'); }
  • src/index.ts:528-530 (registration)
    Registration of tool list handler, which returns the tools array containing the 'buddypress_list_components' tool schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • Helper function buddypressRequest used by the handler to make authenticated requests to BuddyPress REST API endpoints.
    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