Skip to main content
Glama

Analyze comments

analyze_comments
Read-onlyIdempotent

Evidence for qualitative questions about comments, such as "why were people negative in the last 60 days" or "what do people ask about shipping". For the comments matching the filters, the result has counts by sentiment, tag, platform, language and day, the posts drawing most of them, frequent terms and two-word phrases (with lift against all comments of the range when filtered), and a balanced sample of comment texts spread over time and posts, de-duplicated, with ids and links. Posts and sampled comments on an ad carry the ad with its ad set and campaign (ids and names). Comments by the brand itself are excluded. The sample is random but repeatable for the same input. The texts carry the reasons; the counts say how representative they are.

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": "analyze_comments"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
adIdNo
fromNo
isAdNo
tagsNoOnly items carrying any of these tag slugs.
brandYes
postIdNoOnly comments on this post.
searchNoOnly items whose text contains this, case-insensitive (a plain substring, not a query language).
adSetIdNo
intervalNoauto
languageNoOnly items detected in this language code, e.g. "de".
timeZoneNo
platformsNo
adCampaignNo
sampleSizeNoTexts in the sample (5-150). The result stays under ~55,000 characters, so long texts can mean fewer items.
sentimentsNoOnly items with these sentiments.
adCampaignIdNo
includeChartsNo
maxTextLengthNoCharacters kept per sampled text (60-500).
includeRepliesNoInclude replies to other comments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already establish readOnly, idempotent, non-destructive, closed-world behavior, and the description adds real context beyond that: brand-authored comments are excluded, the sample is random but repeatable for identical input, results are capped around 55,000 characters, and ad hierarchy is attached when relevant. These are useful disclosures, but there is no mention of permissions, rate limits, or latency for what is clearly an expensive aggregation call.

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 purpose and examples are front-loaded, and every sentence adds information about the result shape rather than restating the name. It is dense and could be broken into bulleted output components, but there is no filler to cut.

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

Completeness4/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 deliberately compensates by enumerating the return payload (sentiment/tag/platform/language/day counts, top posts, terms and bigrams with lift, balanced de-duplicated sample with ids and links). What remains thin is parameter-level guidance across 20 inputs, which is the main completeness gap.

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?

With 20 parameters and only 40% schema description coverage, the description should carry more weight than it does. It explains that filters exist and that lift is computed 'when filtered', and it implies sample sizing and de-duplication, but it never mentions includeCharts, interval, timeZone, includeReplies, or the ad/adSet/adCampaign id-versus-name distinction.

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 names a specific capability (returning evidence for qualitative comment questions) and grounds it in two concrete example questions about negativity and shipping. It clearly conveys that the output is counts plus sampled texts, but it does not name any sibling (e.g. count_comment_terms or sample_tagged_comments) to draw a boundary.

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?

The opening clause plus the two example questions give an agent a clear sense of the trigger conditions: open-ended 'why/what' questions rather than exact counts or raw listing. It stops short of explicit exclusions or naming an alternative tool for cases that only need counts or a raw list.

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