Gnews Top Headlines
gnews_top_headlinesFetch current top news headlines from GNews (requires BYO API key). Optionally filter by category (general, world, nation, business, technology, entertainment, sports, science, health), country code, and language. Returns up to the plan cap (free 10, paid up to 100) with title, description, source, and publication date.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gnews_top_headlines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Only articles published at or before this time. ISO 8601 date or datetime; a bare date means 23:59:59Z | |
| max | No | Max articles to return (1-100, default 10). GNews caps this by plan (free 10); see requested/returned in the response | |
| from | No | Only articles published at or after this time. ISO 8601 date or datetime; a bare date means 00:00:00Z | |
| lang | No | Language code (e.g., "en"). Default: "en" | |
| _apiKey | Yes | GNews API key | |
| country | No | Country code (e.g., "us", "gb"). Omit for global | |
| category | No | News category: general, world, nation, business, technology, entertainment, sports, science, health |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| articles | Yes | List of top news headlines | |
| returned | Yes | Number of articles returned in this response | |
| requested | No | Articles asked for (max) | |
| empty_reason | No | Present when GNews matched articles but delivered none: before_free_window (from is older than the free plan history of 30 days) or filtered_out. Never no_match while total_articles is above 0 | |
| window_check | No | Present when articles fall outside the window | |
| total_articles | Yes | Total number of top headline articles | |
| window_applied | No | The from/to window sent upstream (ISO 8601 UTC), null for an open end | |
| window_history | No | Plan-history caveat when from is over 30 days ago | |
| count_explanation | No | Present when returned < requested: why (GNews plan cap or too few matches) | |
| empty_explanation | No | Plain-words account of why a matched total came back with no articles | |
| plan_cap_observed | No | Per-request cap observed on the GNews plan behind the key | |
| articles_outside_window | No | Returned articles dated outside the window |