Skip to main content
Glama

buddypress_get_activity

Retrieve a specific BuddyPress activity item by its ID to access community interactions and updates within WordPress sites.

Instructions

Get a single activity item by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesActivity ID

Implementation Reference

  • Handler logic for the 'buddypress_get_activity' tool: retrieves a single activity item by ID via the BuddyPress API endpoint /activity/{id}.
    else if (name === 'buddypress_get_activity') {
      result = await buddypressRequest(`/activity/${args.id}`);
    }
  • Input schema definition for the tool, specifying that an 'id' parameter (number) is required.
    inputSchema: {
      type: 'object',
      properties: {
        id: { type: 'number', description: 'Activity ID', required: true },
      },
      required: ['id'],
    },
  • src/index.ts:67-77 (registration)
    Registration of the tool in the tools array, which is returned by ListToolsRequestHandler.
    {
      name: 'buddypress_get_activity',
      description: 'Get a single activity item by ID',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'number', description: 'Activity ID', required: true },
        },
        required: ['id'],
      },
    },
  • Shared helper function that makes authenticated HTTP requests to BuddyPress REST API endpoints, used by all BuddyPress tools including this one.
    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 the full burden of behavioral disclosure but offers minimal information. It states this is a read operation ('Get'), implying it's non-destructive, but doesn't cover authentication requirements, rate limits, error handling, or what happens if the ID doesn't exist. For a tool with zero annotation coverage, this is insufficient.

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 communicates the core purpose without unnecessary words. It's appropriately sized for a simple retrieval tool and front-loads the essential information. Every word earns its place.

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 the lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what an 'activity item' contains, the return format, potential errors, or how this fits into broader workflows. For a tool with no structured metadata, the description should provide more contextual guidance.

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 the single parameter 'id' clearly documented as 'Activity ID'. The description adds no additional semantic context beyond what the schema provides (e.g., format examples, valid ranges, or relationship to other tools). The baseline score of 3 reflects adequate but minimal value addition.

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 ('a single activity item by ID'), making the purpose immediately understandable. It distinguishes from sibling tools like 'buddypress_list_activities' by specifying retrieval of a single item rather than a list. However, it doesn't fully differentiate from other 'get' tools like 'buddypress_get_group' beyond the resource type.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'buddypress_list_activities' for multiple items or other 'get' tools for different resources. There's no context about prerequisites, error conditions, or typical use cases.

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