Skip to main content
Glama
facebook-mcp

facebook-mcp

by IvanBBaev

Reply to comment

facebook_reply_to_comment

Post a public reply under a Facebook comment, optionally with a photo or GIF, so everyone in the thread can see the response. Use a private reply when the message should not be public.

Instructions

Post a PUBLIC reply under a comment — visible to everyone who can see the thread. Takes message, an attachment (photo URL, GIF URL or a local photo under FB_MEDIA_DIR), or both. For a private message to the commenter use facebook_private_reply instead. Additive and reversible by deleting the reply, but NOT idempotent: if the response is lost, verify with facebook_list_comments before retrying, or you will post twice. Needs a PAGE token with pages_manage_engagement and the MODERATE task.

Input Schema

NameRequiredDescriptionDefault
applyNoSet true to actually perform the write. Omitted or false ⇒ the server decides from its configured write mode: usually a dry run that returns a plan preview and changes nothing, but a server (or package) configured apply-first performs the write. To be certain nothing happens, read the result: a dry run always reports the plan and says the write was NOT performed.
messageNoThe text to send. Written by you — Facebook rejects an empty message.
plan_idNoThe `planId` returned by a preceding dry-run preview of this same tool. Required for irreversible and spend-tier writes; plans expire a few minutes after they are created.
profileNoPage profile key (e.g. "brand-a") or a raw Page ID. Omitted ⇒ the default Page (FB_PAGE_ID).
attachmentNoOptional photo or GIF for the reply. Pass `url` with image_url / gif_url, `path` with photo_path.
comment_idYesComment ID, e.g. "123456_789012" as returned by facebook_list_comments. Not a post ID.
saved_reply_idNoId of a saved reply (facebook_list_saved_replies) to send instead of `message`. Its text is resolved now and bound to the plan, so editing the template after the preview makes the apply diverge.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.8.0
    • addedInput schema / properties / attachment
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional photo or GIF for the reply. Pass `url` with image_url / gif_url, `path` with photo_path.",
      +  "properties": {
      +    "kind": {
      +      "description": "image_url ⇒ `url` is a photo Facebook fetches (attachment_url); gif_url ⇒ `url` is a GIF link (attachment_share_url); photo_path ⇒ `path` is a local image under FB_MEDIA_DIR, uploaded with the reply.",
      +      "enum": [
      +        "image_url",
      +        "gif_url",
      +        "photo_path"
      +      ],
      +      "type": "string"
      +    },
      +    "path": {
      +      "description": "For photo_path: a file path inside FB_MEDIA_DIR.",
      +      "maxLength": 1024,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "For image_url / gif_url: a public https:// URL without credentials.",
      +      "format": "uri",
      +      "maxLength": 2048,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kind"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / comment_id / pattern
      Added value: +"^(?=.*\\w)[\\w.-]+$"
    • addedInput schema / properties / saved_reply_id
      Added value: +{
      +  "description": "Id of a saved reply (facebook_list_saved_replies) to send instead of `message`. Its text is resolved now and bound to the plan, so editing the template after the preview makes the apply diverge.",
      +  "pattern": "^[a-z0-9][a-z0-9-]{0,47}$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "comment_id",
      -  "message"
      -]New value: +[
      +  "comment_id"
      +]
  2. First observedv0.7.0

TDQS

A4.7/5.0
Behavior4/5

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

Goes well past the annotations by disclosing public visibility, required PAGE token scopes (pages_manage_engagement, MODERATE task), reversibility, and the non-idempotent retry hazard with a mitigation. The non-idempotency is already hinted by idempotentHint=false, but the concrete failure mode and recovery step are new information; only the apply/dry-run mechanics are left to the schema.

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?

Three tight sentences: visibility and action first, content rules second, alternative tool and retry hazard last. No restatement of the name, no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers everything an agent needs before a mutating public post: auth scopes, visibility, content requirements, the sibling to prefer for the private case, and safe retry behavior. Remaining details (apply/plan_id dry-run semantics, attachment enum values) are fully documented in the schema, and there is no output schema to explain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds genuine meaning: message, attachment, or both — clarifying the at-least-one content requirement that the schema does not encode, and naming the accepted attachment forms. It omits saved_reply_id entirely, which is an alternative the agent must notice in the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Post a PUBLIC reply under a comment") and immediately pins down scope with "visible to everyone who can see the thread". It also names the distinction from facebook_comment_on_post and facebook_private_reply implicitly, so an agent can route correctly without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the private-message case to facebook_private_reply, and gives a concrete recovery procedure (verify with facebook_list_comments before retrying) rather than a generic warning. The when-to-use rule is stated, not inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.