buddypress_create_friendship
Send a friendship request between two users by specifying their user IDs to establish connections within a BuddyPress community.
Instructions
Create a friendship request
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| initiator_id | Yes | Initiator user ID | |
| friend_id | Yes | Friend user ID |
Implementation Reference
- src/index.ts:378-390 (registration)Registers the 'buddypress_create_friendship' tool in the tools array, including its description and input schema for creating a friendship request between two users.{ name: 'buddypress_create_friendship', description: 'Create a friendship request', inputSchema: { type: 'object', properties: { initiator_id: { type: 'number', description: 'Initiator user ID', required: true }, friend_id: { type: 'number', description: 'Friend user ID', required: true }, }, required: ['initiator_id', 'friend_id'], }, }, {
- src/index.ts:679-681 (handler)Executes the tool by sending a POST request to the BuddyPress REST API endpoint '/friends' with the input arguments (initiator_id and friend_id).else if (name === 'buddypress_create_friendship') { result = await buddypressRequest('/friends', 'POST', args); }