buddypress_list_messages
Retrieve and display message threads from BuddyPress user inboxes, sent items, or notifications with filtering by read status and pagination controls.
Instructions
List message threads
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| box | No | Message box (inbox, sentbox, notices) | |
| page | No | Page number (default: 1) | |
| per_page | No | Items per page (default: 20) | |
| type | No | Message type (all, read, unread) | |
| user_id | No | User ID to get messages for |
Implementation Reference
- src/index.ts:687-695 (handler)Handler logic for the buddypress_list_messages tool. Constructs URL query parameters from input arguments (user_id, box, type, page, per_page) and makes an authenticated GET request to the BuddyPress /messages endpoint using the shared buddypressRequest helper.else if (name === 'buddypress_list_messages') { const params = new URLSearchParams(); if (args.user_id) params.append('user_id', String(args.user_id)); if (args.box) params.append('box', String(args.box)); if (args.type) params.append('type', String(args.type)); if (args.page) params.append('page', String(args.page)); if (args.per_page) params.append('per_page', String(args.per_page)); result = await buddypressRequest(`/messages?${params}`); }
- src/index.ts:404-416 (schema)Input schema definition for the buddypress_list_messages tool, specifying optional parameters for filtering and pagination of message threads.name: 'buddypress_list_messages', description: 'List message threads', inputSchema: { type: 'object', properties: { user_id: { type: 'number', description: 'User ID to get messages for' }, box: { type: 'string', description: 'Message box (inbox, sentbox, notices)' }, type: { type: 'string', description: 'Message type (all, read, unread)' }, page: { type: 'number', description: 'Page number (default: 1)' }, per_page: { type: 'number', description: 'Items per page (default: 20)' }, }, }, },