Skip to main content
Glama
facebook-mcp

facebook-mcp

by IvanBBaev

Posts Insights

facebook_get_posts_insights
Read-onlyIdempotent

Retrieve lifetime insights for up to 25 Facebook posts in one compact table by selecting post IDs or recent posts, with per-post errors and optional CSV or JSON export.

Instructions

Lifetime insights for several posts in one call, as a compact table: one row per post with values (one scalar per metric) and unaggregated breakdowns (e.g. reactions by type). Pass post_ids or latest (the N most recent published posts). Defaults to views, unique viewers, clicks and reactions by type. A post Graph refuses, or one on another Page, gets a row error instead of failing the call. output:{format} writes the table to a CSV (one line per post × metric) or JSON file in FB_EXPORT_DIR and returns its path instead of the rows. For one post with full summaries use facebook_post_insights.

Input Schema

NameRequiredDescriptionDefault
latestNoInstead of post_ids: the N most recent published posts.
outputNoWrite the FULL series to a local file in FB_EXPORT_DIR instead of returning rows. The row cap does not apply to the file; the inline result is the aggregate-mode summary (no rows, max_rows and aggregate are ignored) plus `export: {path, format, rows, bytes, sha256}`. Use it for long daily series that would otherwise be truncated.
metricsNoLifetime post metric names (the table columns). Vetted once, on the first post: a dead or rejected name is dropped for the rest.
profileNoPage profile key (e.g. "brand-a") or a raw Page ID. Omitted ⇒ the default Page (FB_PAGE_ID).
post_idsNoPost IDs ({page-id}_{post-id}) to compare, 1-25. Exactly one of post_ids or latest.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.6/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: a post Graph refuses or that belongs to another Page yields an `error` row rather than failing the whole call, and the export path writes to FB_EXPORT_DIR and returns the path instead of rows. Annotations already cover the read-only/idempotent profile, so this is strong but not quite exhaustive — rate limits or the 25-post cap behavior are not restated here.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose and the result shape, then the routing rule, then the export caveat — a sensible gradient. It is dense (backticked field names throughout) but nearly every clause carries information; the sentence on per-post error rows is the only one that could be trimmed slightly.

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?

There is no output schema, so the description carries the return-value burden, and it does: row granularity, the `values` vs `breakdowns` split, error rows, and the export return payload (path instead of rows). Combined with a fully documented schema for a 5-param, nested-object tool, an agent has everything needed to call it correctly.

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 the baseline is 3, but the description adds meaning on top: it names the default metric set (views, unique viewers, clicks, reactions by type) and frames `breakdowns` as unaggregated, which explains what the metric list actually produces. It does not add syntax or format detail for `profile` or `file_name` beyond the schema.

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 ('Lifetime insights for several posts in one call') and pins the output shape ('compact table: one row per post with `values` and unaggregated `breakdowns`'). It explicitly names the sibling it is not — facebook_post_insights — so an agent can route immediately.

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?

Gives the concrete selection rule ('Pass `post_ids` or `latest`'), the default behavior when neither is given, and the explicit alternative for the single-post case ('For one post with full summaries use facebook_post_insights'). It also signals when to prefer the file export (long series that would be truncated).

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