Skip to main content
Glama

Count term mentions in comments

count_comment_terms
Read-onlyIdempotent

Exact counts of how many comments (and how many different people) mention each of up to 10 words, product names or phrases, over ALL comments of the range, not a sample. For "how often does X come up", "how many people talk about X", "X or Y, which is mentioned more", "how many complain about the smell", and mention trends by day, week or month. match "word" (default) counts the term as a whole word, case-insensitive ("Creme" matches "creme" and "CREME", not "Eincremen" or "Cremes"); "wordStart" also counts words that begin with it ("Kalk" → "Kalkentferner"); "contains" counts it anywhere in the text. Per term: comments, people, share of all comments in the range, sentiment, platforms and an optional series; plus the comments mentioning any of the terms. Comments by the brand itself are excluded. analyze_comments with search = the term returns what people say about it; list_comments with search lists every matching comment.

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>",
      "terms": "<terms>"
    },
    "name": "count_comment_terms"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
adIdNo
fromNo
isAdNo
tagsNoOnly comments carrying any of these tag slugs.
brandYes
matchNoword (default): whole word only. wordStart: words beginning with the term. contains: anywhere.word
termsYesWords, names or short phrases to count, each on its own, e.g. ["Creme", "Watte"].
postIdNoOnly comments on this post.
adSetIdNo
intervalNoSeries per term: auto (day ≤45 days, week ≤190, else month), day, week (from Monday), month or none.none
timeZoneNo
platformsNo
adCampaignNo
sentimentsNoOnly comments with these sentiments, e.g. ["negative"] for complaints.
adCampaignIdNo
includeRepliesNoInclude replies to other comments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, it discloses meaningful behavior: counts are exact rather than sampled, comments authored by the brand are excluded, and matching is case-insensitive with three distinct modes illustrated by examples. It also sketches the return shape (per-term comments, people, share, sentiment, platforms, optional series). It does not cover filtering interactions such as whether sentiments or platform filters alter the 'share of all comments' denominator.

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?

Information is front-loaded: what it does, then use cases, then match semantics, then return shape, then alternatives. It is dense but mostly earns its length; the run of example questions ("how many complain about the smell") is slightly padded for what it conveys.

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?

For a 17-parameter analytics tool with no output schema, the description covers the essentials: exactness, brand-comment exclusion, match modes, per-term metrics and the optional series, plus sibling routing. The notable omission is any statement of how the many filter parameters interact with the reported counts and denominators.

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 17 parameters and only 41% schema description coverage, the description does well on the two semantically hard ones: match mode is explained with worked examples ("Creme" vs "Eincremen", "Kalk" → "Kalkentferner") and the 10-term cap and per-interval series granularity are restated. The remaining parameters — brand, from/to, tags, sentiments, platforms, includeReplies, the ad/post scoping fields — get no meaning from the description, leaving the coverage gap largely unaddressed.

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 opening sentence states a precise verb and resource — exact counts of comments and distinct people mentioning each of up to 10 terms — and bounds the scope (over ALL comments in the range, not a sample). It is immediately distinguishable from analyze_comments and list_comments, which the description names and characterizes.

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?

It enumerates concrete triggering questions ("how often does X come up", "X or Y, which is mentioned more", mention trends by day/week/month) and explicitly routes the agent elsewhere: analyze_comments with search for what people say about a term, list_comments with search for the matching comments themselves.

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