fc_update_comment
Modify existing comments by updating the message content or changing the comment status within the FluentCommunity platform.
Instructions
Update an existing comment
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment_id | Yes | The ID of the comment to update | |
| message | No | Updated comment message | |
| status | No | Comment status |
Implementation Reference
- src/tools/fluent-community.ts:442-450 (handler)The main handler function for fc_update_comment tool. It extracts comment_id and updateData from args, makes a POST request to the WordPress API endpoint fc-manager/v1/comments/{comment_id} with the update data, and returns the response or error.fc_update_comment: async (args: any) => { try { const { comment_id, ...updateData } = args; const response = await makeWordPressRequest('POST', `fc-manager/v1/comments/${comment_id}`, updateData); return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } }; } catch (error: any) { return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } }; } },
- Zod input schema validation for the fc_update_comment tool, requiring comment_id (number) and message (string).const updateCommentSchema = z.object({ comment_id: z.number().describe('The ID of the comment to update'), message: z.string().describe('Updated comment message') });
- src/tools/fluent-community.ts:226-230 (registration)Tool registration entry in the fluentCommunityTools array, defining the tool name, description, and referencing the input schema.{ name: 'fc_update_comment', description: 'Update an existing FluentCommunity comment', inputSchema: { type: 'object', properties: updateCommentSchema.shape } },