Skip to main content
Glama

fc_create_comment

Add comments to posts in FluentCommunity WordPress plugin by specifying post ID, user ID, and message content to facilitate community discussions.

Instructions

Create a new comment on a post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idYesThe post ID to comment on
user_idYesThe user ID creating the comment
messageYesComment message
parent_idNoParent comment ID for replies

Implementation Reference

  • The async handler function that executes the fc_create_comment tool, sending a POST request to the WordPress API to create a new comment on a post.
    fc_create_comment: async (args: any) => {
      try {
        const commentData: any = {
          post_id: args.post_id,
          user_id: args.user_id,
          message: args.message,
        };
        
        if (args.parent_id) commentData.parent_id = args.parent_id;
        
        const response = await makeWordPressRequest('POST', 'fc-manager/v1/comments', commentData);
        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 defining the parameters for the fc_create_comment tool: post_id, user_id, and message.
    const createCommentSchema = z.object({
      post_id: z.number().describe('The post ID to comment on'),
      user_id: z.number().describe('The user ID who creates the comment'),
      message: z.string().describe('Comment content')
    });
  • Tool registration object for fc_create_comment in the fluentCommunityTools array, including name, description, and input schema reference.
    {
      name: 'fc_create_comment',
      description: 'Create a new comment on a FluentCommunity post',
      inputSchema: { type: 'object', properties: createCommentSchema.shape }
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a creation operation but doesn't mention permissions required, whether it's idempotent, rate limits, error conditions, or what happens on success. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that gets straight to the point with zero wasted words. It's appropriately sized for a simple creation tool and front-loads the essential information.

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?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, error conditions, permissions needed, or how it differs from related comment operations. Given the complexity of creating data in a system with sibling tools for updating and deleting comments, more context is needed.

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%, so the schema already documents all 4 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced parameter documentation.

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 clearly states the action ('Create a new comment') and target resource ('on a post'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'fc_update_comment' or 'fc_delete_comment' beyond the basic action, which prevents a perfect score.

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 like 'fc_update_comment' or 'fc_delete_comment', nor does it mention prerequisites or contextual constraints. It simply states what the tool does without indicating appropriate usage scenarios.

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

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