Count stories
count_storiesCounts 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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Boolean 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_date | Yes | Last publication date, YYYY-MM-DD. | |
| source_ids | No | Media sources to search. Find IDs with search_sources. | |
| start_date | Yes | First publication date, YYYY-MM-DD. | |
| collection_ids | No | Collections to search. Find IDs with search_collections. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||