Skip to main content
Glama

Count articles over time

count_articles
Read-onlyIdempotent

Exact article counts over time for 1–5 boolean queries: a daily, weekly or monthly timeline of news volume, and share of voice between queries (companies, brands, topics). Use it for trends, spikes, "is coverage rising", comparing competitors, or charting attention around an event. Each bucket × query is one 5-credit call (at most 60 calls), so a 30-day daily timeline for 2 queries is 60 calls / 300 credits and takes about a minute.

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": {
      "queries": "<queries>",
      "from": "<from>"
    },
    "name": "count_articles"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd of the period: ISO date or "today"/"yesterday" (default: now).
fromYesStart of the period: ISO date ("2026-09-01") or relative ("14d", "30 days ago"); up to 12 months back.
formatNotext (default, compact) or json (machine-readable).text
queriesYes1 to 5 boolean queries to count (same syntax as list_articles), e.g. ["Tesla", "Rivian", "Lucid"] for share of voice.
sourcesNoOnly these publishers: domains, e.g. ["reuters.com","ft.com"].
intervalNoBucket size: day (default), week or month.day
countriesNoOnly publishers from these countries: ISO 3166-1 alpha-2 codes, e.g. ["US","GB"].
languagesNoOnly these languages: ISO 639-1 codes, e.g. ["en","de"].
llm_modelNoThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
search_inNoWhere queries are matched (default title_body). Use ["title"] to count only headline mentions.
exclude_sourcesNoLeave out these publishers (domains).
exclude_countriesNoLeave out publishers from these countries (ISO 3166-1 alpha-2).
exclude_languagesNoLeave out these languages (ISO 639-1).
exclude_duplicatesNoLeave out syndicated copies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the readOnly/openWorld/idempotent annotations, it discloses the cost and latency model: each bucket × query is one 5-credit call, capped at 60 calls, with a worked example (30-day daily × 2 queries = 60 calls / 300 credits, ~1 minute). That is exactly the kind of operational context annotations cannot convey. It stops short of describing truncation or behavior at the 60-call ceiling.

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?

Three sentences: purpose, use cases, then cost. Front-loaded and dense with no filler, though the cost sentence is long and packs three numbers together, which slightly reduces scannability.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter tool with no output schema, the description covers purpose, usage, and cost well but says nothing about the shape of the returned timeline or how share of voice is expressed. An agent still must guess what the response looks like before calling.

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; the description earns an extra point by explaining the semantics of the query array as share-of-voice inputs and by tying the call-count formula to the interval/queries/date-range combination, which the schema cannot express. It still doesn't explain the interplay of the many exclude_* filters or search_in variants in prose.

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 gives a specific verb+resource (exact article counts over time) and scope (1–5 boolean queries, day/week/month buckets), plus share-of-voice comparison between queries. It is clearly distinguishable from list_articles or search_news, which return articles rather than aggregated counts.

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 names concrete use cases: trends, spikes, "is coverage rising", competitor comparison, charting attention around an event. That is clear positive guidance, but it offers no explicit when-not or named alternative (e.g. use list_articles when you need the actual headlines).

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