Count stories by source over time
count_stories_by_source_over_timeCompare attention across media sources over time by counting matching stories per source per time bucket, revealing coverage volume and source ratios.
Instructions
Compare attention across sources: matching stories, total stories and ratio per bucket.
Returns one row per source per time bucket, so a large collection can produce many rows.
truncated says whether rows were dropped to fit max_rows.
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_by_source_over_time"
}
}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. | |
| interval | No | Time bucket size. | week |
| max_rows | No | Most rows to return. | |
| 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 | |||