Skip to main content
Glama

fc_update_post

Modify existing community posts by updating content, status, privacy settings, or metadata to maintain current and relevant discussions.

Instructions

Update an existing post in FluentCommunity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idYesThe ID of the post to update
titleNoPost title
messageNoPost content/message
message_renderedNoRendered HTML version of the message
typeNoPost type
statusNoPost status
privacyNoPost privacy setting
featured_imageNoURL of the featured image
metaNoAdditional metadata as JSON object

Implementation Reference

  • The main handler function for the 'fc_update_post' tool. It extracts post_id and update data from args, makes a POST request to the WordPress API endpoint 'fc-manager/v1/posts/{post_id}', and returns the response or error.
    fc_update_post: async (args: any) => { try { const { post_id, ...updateData } = args; const response = await makeWordPressRequest('POST', `fc-manager/v1/posts/${post_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 schema defining the input validation for the 'fc_update_post' tool, including post_id (required), and optional fields like title, message, status, and privacy.
    const updatePostSchema = z.object({ post_id: z.number().describe('The ID of the post to update'), title: z.string().optional().describe('Post title'), message: z.string().optional().describe('Post content/message'), status: z.enum(['published', 'draft', 'pending', 'archived']).optional().describe('Post status'), privacy: z.enum(['public', 'private', 'friends']).optional().describe('Post privacy setting') });
  • Tool registration in the fluentCommunityTools array, specifying the name 'fc_update_post', description, and referencing the updatePostSchema for input validation. This array is later spread into the main allTools export in src/tools/index.ts.
    { name: 'fc_update_post', description: 'Update an existing FluentCommunity post', inputSchema: { type: 'object', properties: updatePostSchema.shape } },

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/wplaunchify/fluent-community-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server