Skip to main content
Glama

Count mentions

mentions_stats
Read-only

Count mentions instead of reading them: how many, when, where, by whom and on which terms, over up to 90 days, in one call. Call it before list_mentions for any question that starts with "how many", and for questions like "how did this week compare with last week?" (one call per window, group_by ["day"]), "which Source carries the complaints?" (group_by ["source", "sentiment"]) or "which terms catch the most?" (group_by ["term"]). rows holds one count per combination and leaves out the empty ones, so a quiet day is a missing row. total counts the whole window whatever top kept, truncated says an open axis was cut, and unread says how many mentions nothing has read when sentiment, intent or relevance is an axis. A mention caught by two terms counts under each term. Dates are publication dates, and the counts are the ones the dashboard Insights shows: they include mentions a mute rule or a hide keeps out of list_mentions, which can therefore return fewer. Page list_mentions afterwards only to quote. Free — does not charge credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoHow many authors, terms or keywords to keep, busiest first. Defaults to 10.
sinceNoISO 8601 instant. Counts mentions published after it (collection date where the Source gives none). Defaults to 7 days before until.
untilNoISO 8601 instant, inclusive. Defaults to now. The window covers 90 days at most; for a longer period, count it in parts.
authorNoOnly mentions from these accounts — several are OR'd, so ["alice", "bob"] is both in one call. Matched exactly, as the Source writes the handle and without a leading "@": this is a filter, not a search (use q to search text). A handle the account has never seen returns an empty page, and a mention with no author never matches.
intentNoOnly mentions read as one of these intents — several are OR'd, so ["purchase_intent", "comparison"] is the leads view in one call. "unread" is what nothing has classified yet.
sourceNoOnly these Sources — several are OR'd, so ["reddit", "hackernews"] is both in one call. Absent means every Source the account polls.
keywordNoOnly this keyword's mentions, by id from list_keywords, including what its searches caught before they last changed. An id that is not one of the account's keywords is an error.
group_byYesOne or two axes to count along: ["source", "sentiment"] is one count per Source and sentiment. day and hour cannot be combined. author, term and keyword are open lists, cut at top.
relevanceNoOnly mentions read as this relevant to their keyword — several are OR'd, so ["high", "medium"] leaves out what matched by accident (another meaning, a handle, spam). "unread" is what nothing has read yet.
sentimentNoOnly mentions read as one of these sentiments — several are OR'd, so ["negative", "question"] is "what needs an answer" in one call. "unread" is what nothing has classified yet.
engagementNoA per-Source rule, repeatable: "<source|*>:<metric><operator><number>" — ["x:likes>=100", "reddit:score>50"] is "what landed, judged by what landing means where it was posted". Metrics are likes, replies, reposts, comments, score, views, plus total for the same interaction sum engagement_min reads. Operators are >=, >, =, <, <=; the number is whole and may be negative (Reddit and Lemmy net downvotes out). A Source no rule names PASSES — ["x:likes>=100"] narrows X and leaves Hacker News alone — a named rule overrides * for its own Source, and several rules on one Source are ANDed; use source to ask for one Source. A metric that was never counted satisfies NOTHING, < included: YouTube reports no likes, RSS and AI answers report no audience, and mentions recorded before 2026-09-04 predate the field, so ["youtube:likes<10"] returns none of them rather than all of them. Send this or engagement_min, never both.
engagement_minNoOnly mentions with at least this many interactions — likes, replies, reposts, comments or score, depending on the Source. Never counts views. Mentions with no counters at all (RSS, AI answers, anything recorded before 2026-09-04) are left out rather than treated as zero. Counters are captured when the item is collected and never refreshed, so a threshold reads against recent mentions. For a threshold on one metric on one Source, use engagement instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / group_by / items / enum
      Previous value: -[
      -  "day",
      -  "hour",
      -  "source",
      -  "sentiment",
      -  "intent",
      -  "author",
      -  "term",
      -  "keyword"
      -]New value: +[
      +  "day",
      +  "hour",
      +  "source",
      +  "sentiment",
      +  "intent",
      +  "relevance",
      +  "author",
      +  "term",
      +  "keyword"
      +]
    • addedInput schema / properties / relevance
      Added value: +{
      +  "description": "Only mentions read as this relevant to their keyword — several are OR'd, so [\"high\", \"medium\"] leaves out what matched by accident (another meaning, a handle, spam). \"unread\" is what nothing has read yet.",
      +  "items": {
      +    "enum": [
      +      "high",
      +      "medium",
      +      "low",
      +      "unread"
      +    ],
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
  2. Changed5 schema fields changed
    • changedInput schema / properties / group_by / description
      Previous value: -"One or two axes to count along: [\"source\", \"sentiment\"] is one count per Source and sentiment. day and hour cannot be combined. author, term and query are open lists, cut at top."New value: +"One or two axes to count along: [\"source\", \"sentiment\"] is one count per Source and sentiment. day and hour cannot be combined. author, term and keyword are open lists, cut at top."
    • changedInput schema / properties / group_by / items / enum
      Previous value: -[
      -  "day",
      -  "hour",
      -  "source",
      -  "sentiment",
      -  "intent",
      -  "author",
      -  "term",
      -  "query"
      -]New value: +[
      +  "day",
      +  "hour",
      +  "source",
      +  "sentiment",
      +  "intent",
      +  "author",
      +  "term",
      +  "keyword"
      +]
    • addedInput schema / properties / keyword
      Added value: +{
      +  "description": "Only this keyword's mentions, by id from list_keywords, including what its searches caught before they last changed. An id that is not one of the account's keywords is an error.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • removedInput schema / properties / query
      Removed value: -{
      -  "description": "Only this Query's mentions, by id from list_queries, including what its searches caught before they last changed. An id that is not one of the account's Queries is an error.",
      -  "format": "uuid",
      -  "type": "string"
      -}
    • changedInput schema / properties / top / description
      Previous value: -"How many authors, terms or Queries to keep, busiest first. Defaults to 10."New value: +"How many authors, terms or keywords to keep, busiest first. Defaults to 10."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, but the description adds substantial behavior: rows omit zero-count combinations, total/truncated/unread fields have distinct meanings, terms double-count mentions, and counts include muted/hidden mentions that list_mentions excludes. No contradiction with the annotations.

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 long but front-loaded and dense: purpose and usage examples come first, followed by output behavior and caveats. A few phrases, like 'how many, when, where, by whom and on which terms,' are somewhat redundant with the examples, but every sentence contributes meaningful selection or invocation guidance.

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?

With no output schema, the description covers the key response fields (rows, total, truncated, unread), the 90-day window limit, counting quirks like double-counted terms, and the relationship to list_mentions. An agent has enough context to select, invoke, and interpret results 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 100%, so the baseline is 3; the description adds use-case-driven guidance for group_by ('day' for week comparisons, ['source','sentiment'] for source complaints, 'term' for top terms) and explains open-axis truncation and 'unread' semantics. It does not re-document every parameter, but the schema already handles that.

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?

Opens with 'Count mentions instead of reading them,' which is a specific verb, resource, and direct contrast to the sibling list_mentions. The 'how many' framing and the question examples make it unmistakably a counting tool, not a retrieval tool.

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 directs agents to call it before list_mentions for any question that starts with 'how many,' and gives concrete question-to-group_by mappings. It also closes with 'Page list_mentions afterwards only to quote,' providing a clear when-not and alternative.

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