Skip to main content
Glama

buddypress_get_xprofile_data

Retrieve extended profile data for specific users and fields in BuddyPress community sites. Use this tool to access user profile information programmatically through the REST API.

Instructions

Get XProfile data for a specific user and field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
field_idYesField ID
user_idYesUser ID

Implementation Reference

  • src/index.ts:338-349 (registration)
    Registration of the buddypress_get_xprofile_data tool including its schema definition with input parameters field_id and user_id.
    {
      name: 'buddypress_get_xprofile_data',
      description: 'Get XProfile data for a specific user and field',
      inputSchema: {
        type: 'object',
        properties: {
          field_id: { type: 'number', description: 'Field ID', required: true },
          user_id: { type: 'number', description: 'User ID', required: true },
        },
        required: ['field_id', 'user_id'],
      },
    },
  • Handler implementation for the buddypress_get_xprofile_data tool. It constructs the BuddyPress REST API endpoint `/xprofile/{field_id}/data/{user_id}` and calls the shared buddypressRequest helper to fetch the XProfile data.
    else if (name === 'buddypress_get_xprofile_data') {
      result = await buddypressRequest(`/xprofile/${args.field_id}/data/${args.user_id}`);
    }
  • Shared helper function used by all BuddyPress tools, including buddypress_get_xprofile_data, 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();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose behavioral traits such as read-only nature, authentication needs, error handling, rate limits, or what the returned data looks like, which are critical for a tool with no output schema.

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 with zero waste. It front-loads the core purpose clearly and appropriately sized for a simple retrieval tool.

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

Completeness2/5

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

Given no annotations, no output schema, and a simple input schema, the description is incomplete. It lacks details on return values, error cases, or behavioral context, making it inadequate for the agent to fully understand how to use this tool effectively.

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%, so the schema already documents both parameters ('field_id' and 'user_id'). The description adds no additional meaning beyond implying these are required for targeting, matching the baseline for high schema coverage without extra param details.

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 ('XProfile data') with specific targeting ('for a specific user and field'). It distinguishes from siblings like 'buddypress_get_xprofile_field' or 'buddypress_update_xprofile_data' by focusing on data retrieval rather than field metadata or updates, though it doesn't explicitly contrast them.

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. It doesn't mention prerequisites, context, or compare to siblings like 'buddypress_get_member' or 'buddypress_list_xprofile_fields', leaving the agent to infer usage from the 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