Skip to main content
Glama

buddypress_create_activity

Create new activity items in BuddyPress for user updates, group posts, or comments using the REST API.

Instructions

Create a new activity item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesActivity content
user_idNoUser ID (default: current user)
componentNoComponent (activity, groups, members, etc.)
typeNoActivity type (activity_update, activity_comment, etc.)
primary_item_idNoPrimary item ID (e.g., group ID)
secondary_item_idNoSecondary item ID

Implementation Reference

  • Handler logic for the buddypress_create_activity tool. Executes a POST request to the BuddyPress /activity endpoint using the provided arguments.
    else if (name === 'buddypress_create_activity') {
      result = await buddypressRequest('/activity', 'POST', args);
    }
  • Input schema definition for the buddypress_create_activity tool, specifying parameters like content (required), user_id, component, type, etc.
    inputSchema: {
      type: 'object',
      properties: {
        content: { type: 'string', description: 'Activity content', required: true },
        user_id: { type: 'number', description: 'User ID (default: current user)' },
        component: { type: 'string', description: 'Component (activity, groups, members, etc.)' },
        type: { type: 'string', description: 'Activity type (activity_update, activity_comment, etc.)' },
        primary_item_id: { type: 'number', description: 'Primary item ID (e.g., group ID)' },
        secondary_item_id: { type: 'number', description: 'Secondary item ID' },
      },
      required: ['content'],
    },
  • src/index.ts:78-93 (registration)
    Registration of the buddypress_create_activity tool in the tools array, including name, description, and input schema.
    {
      name: 'buddypress_create_activity',
      description: 'Create a new activity item',
      inputSchema: {
        type: 'object',
        properties: {
          content: { type: 'string', description: 'Activity content', required: true },
          user_id: { type: 'number', description: 'User ID (default: current user)' },
          component: { type: 'string', description: 'Component (activity, groups, members, etc.)' },
          type: { type: 'string', description: 'Activity type (activity_update, activity_comment, etc.)' },
          primary_item_id: { type: 'number', description: 'Primary item ID (e.g., group ID)' },
          secondary_item_id: { type: 'number', description: 'Secondary item ID' },
        },
        required: ['content'],
      },
    },
  • Helper function used by all BuddyPress tools, including buddypress_create_activity, 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();
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Create a new activity item' implies a write operation but doesn't specify permissions required, whether it's idempotent, rate limits, error conditions, or what the response looks like (since no output schema exists). For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 ('Create a new activity item') that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, making it easy to parse quickly. Every word earns its place, with no wasted verbiage.

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 tool's complexity (a write operation with 6 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, side effects, or response format, nor does it provide usage guidance. For a mutation tool in this context, the description should do more to compensate for the missing structured information.

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 all 6 parameters documented in the schema (e.g., 'content' as 'Activity content', 'user_id' with default behavior). The description adds no additional parameter information beyond what the schema provides. According to the rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description.

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 'Create a new activity item' clearly states the verb ('Create') and resource ('activity item'), making the purpose immediately understandable. It distinguishes from siblings like 'buddypress_update_activity' (update vs create) and 'buddypress_get_activity' (read vs create), though it doesn't explicitly mention these distinctions. The purpose is specific but lacks explicit sibling differentiation.

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 prerequisites (e.g., user authentication), when to choose this over similar tools like 'buddypress_update_activity' or 'buddypress_favorite_activity', or any contextual constraints. Without such guidance, the agent must infer usage from the tool name and schema 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