Skip to main content
Glama

Get comment analytics

get_comment_analytics
Read-onlyIdempotent

The comment analytics dashboard in one call, for one brand or several brands added together (byBrand then splits volume, sentiment and channels per brand): counts, shares, trends, rankings and response times. sections selects the parts: overview (comment volume and moderation rate vs. the previous period of equal length), sentiment (positive, neutral, negative and without-sentiment counts), tags (comments per tag), response_times (average time from a comment to its first reply, like, hide or delete, by a person or an automation), channels (comments per platform, ad vs. organic), time_saved (estimated work saved: 40 s per automated reply, 30 s per manual reply, 20 s per hide or like), user_engagement (unique and returning commenters, top commenters), top_posts (posts with the most comments in the range, with sentiment), moderation_and_team (replied/liked/hidden/deleted: what happened to the comments received in the range, the actions performed in the range, and per person and automation). Comments written by the brand itself are excluded everywhere. Every filter applies to every section; tags matches any of the slugs. Most sections carry a time series (interval). groupBy splits the comments by adCampaign, adSet, ad or post into ranked, paged groups (ids and names, comments vs. the previous period, sentiment counts and shares, moderated share, top tags, first/last comment; groups.total counts them), for rankings and comparisons of campaigns, ad sets, ads or posts. dataQuality says when a 0 means nothing was recorded (no connected channel, no tagged comments) and when a figure rests on fewer than 20 items. get_account lists the brands and the usage guide.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "brand": "<brand>"
    },
    "name": "get_comment_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
adIdNo
fromNo
isAdNo
sortNoOrder of the groups: comments (count), negativeShare, positiveShare or withoutSentiment (share of all the group's comments, as sentiment.negativePct etc.). Ties by id.comments
tagsNoOnly comments carrying any of these tag slugs (list_tags), e.g. ["pricing"] with groupBy adSet for "which ad sets get the most price questions".
brandYes
limitNoGroups per page (1-100).
orderNoGroup order: desc (default, largest first) or asc.desc
brandsNoMore brands (slugs or ids) to add to the totals. Every brand needs analytics access.
cursorNogroups.nextCursor of the previous page, with the same input otherwise.
adSetIdNo
groupByNoSplit the comments into groups and return them in `groups`, one page at a time: adCampaign, adSet, ad (by the ad ids of the post) or post. Comments on posts without that id (organic posts, ads without campaign data, comments without a post) are in no group; groups.ungroupedComments counts them.
postIdsNoOnly comments on these posts (post ids as returned in topPosts).
intervalNoauto
sectionsNoWhich parts to compute. Defaults to overview, sentiment, tags and response_times; with groupBy to overview only.
timeZoneNo
allBrandsNoAdd every brand this credential can see analytics for. Brands whose plan is inactive are skipped and listed.
platformsNo
postTypesNoOnly comments on these kinds of posts: ad, organic, mention, liveVideo, partnership.
adCampaignNo
minCommentsNoOnly groups with at least this many comments in the range. Default 1 for sort=comments and 10 for the share sorts, so a group with one negative comment does not top a share ranking.
adCampaignIdNo
includeChartsNo
topPostsLimitNoPosts in top_posts (1-25).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive behavior. The description adds substantial context beyond annotations: brand-authored comments are excluded everywhere, every filter applies to every section, dataQuality explains zero-value and small-sample caveats, inactive brands are skipped and listed, and ungrouped comments are counted.

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?

The description is a dense single paragraph but front-loads the core purpose and packs useful detail without filler. It could be more scannable with structure, but every sentence carries operational information.

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?

For a 25-parameter analytics tool with no output schema, the description covers section semantics, grouping and pagination behavior, filter scope, exclusions, defaults, and data-quality caveats. This is sufficient for an agent to invoke the tool 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 description coverage is 52%, so the description must compensate for many parameters. It adds meaningful semantics for sections, groupBy, tags, brands/allBrands, minComments, and dataQuality, though it does not explain every filter parameter such as from/to, adId, or platform enums.

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?

The description states a specific resource and scope: a comment analytics dashboard in one call, for one brand or several brands combined. It enumerates the returned metrics (counts, shares, trends, rankings, response times) and distinguishes the multi-brand aggregation behavior, making the tool's purpose clear.

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

Usage Guidelines4/5

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

It explains when to use the tool for rankings and comparisons via groupBy, how sections select parts, and points to get_account for brands and the usage guide. It does not explicitly exclude or compare against siblings like get_dm_analytics or analyze_comments, so guidance is clear but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources