Skip to main content
Glama
media-cloud-mcp

media-cloud-mcp

by nchafni

Count stories

count_stories
Read-only

Counts stories matching a Boolean query within date and source/collection filters, returning relevant, total, and ratio counts to compare coverage across sources or collections.

Instructions

Count stories matching a query.

Returns relevant (stories matching), total (all stories in the same scope and dates) and ratio (relevant / total). Compare ratios, not raw counts, across sources or collections.

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": {
      "query": "<query>",
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "count_stories"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesBoolean query, e.g. "climate change" AND policy. AND/OR/NOT must be capitalized and phrases need double quotes. Use * to match all stories. Full syntax is in the mediacloud://query-guide resource.
end_dateYesLast publication date, YYYY-MM-DD.
source_idsNoMedia sources to search. Find IDs with search_sources.
start_dateYesFirst publication date, YYYY-MM-DD.
collection_idsNoCollections to search. Find IDs with search_collections.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, open-world, non-destructive operation, so the description need not repeat safety properties. It adds behavioral context by defining relevant, total, and ratio, and by warning that ratios—not raw counts—should be compared across sources or collections. That is useful semantic guidance beyond the annotations, though it does not cover pagination or result-size behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and followed by return semantics and a comparison rule. There is no filler, and the most important information comes first.

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?

The tool’s complexity is moderate: five parameters, a required query, and an output schema that presumably documents return fields. The description explains the key outputs and the ratio-comparison caveat, which is sufficient for correct invocation, but it leaves out explicit selection guidance against the time-series count siblings. That gap is small relative to the rich schema and annotations.

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?

Schema coverage is 100%, so the input schema already documents query syntax, dates, source_ids, and collection_ids. The description adds only the phrase 'matching a query' and the idea that total uses the same scope and dates; it does not give additional parameter constraints or examples. With the schema doing the heavy lifting, the baseline score of 3 is appropriate.

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 states a specific verb-and-resource ('Count stories') and a matching scope ('matching a query'), so its core purpose is clear. It does not explicitly distinguish itself from siblings such as count_stories_over_time or count_stories_by_source_over_time, which is why this is a 4 rather than a 5.

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

Usage Guidelines3/5

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

It gives useful comparison guidance ('Compare ratios, not raw counts, across sources or collections'), implying the tool is for comparing aggregate relevance across scopes. However, it never states when to choose this over list_stories, sample_stories, or the time-series count siblings, so the when-to-use guidance is only partial.

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