Hn Get Stories
hn_get_storiesFetch stories from an HN feed (top, new, best, ask, show, jobs), with title, URL, score, author, and comment count for each story.
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": {
"feed": "<feed>"
},
"name": "hn_get_stories"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feed | Yes | Which HN feed to fetch. "top" includes jobs. "ask" and "show" are Ask HN / Show HN posts. | |
| count | No | Number of stories to return, at most 100 per call. A larger value is served at 100, and the notice names the offset for the next page. Larger counts take longer. | |
| offset | No | Number of stories to skip from the start of the feed. Use with count for pagination. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The count value served: as passed, or 100 when count was above that cap. | |
| feed | No | Which feed was fetched. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of stories returned on this page. | |
| total | No | Total items in the feed (up to 500 for top/new/best, 200 for ask/show/jobs). | |
| notice | No | Agent guidance: the offset to pass for the next page while more stories remain; how many items on this page were omitted, by kind (deleted, dead, missing); the IDs that failed to load and how to retry them (naming the call's 50-second time budget when it cut them); why a page came back empty (an empty feed, or offset past its end); and when count was served at its per-call cap. Absent on the last page of a non-empty result when nothing on it was omitted or failed. | |
| offset | No | Offset that was applied to this page. | |
| hasMore | No | Whether more stories are available beyond this page. | |
| stories | No | Stories from the feed, ordered by HN ranking. | |
| failedIds | No | IDs on this page whose fetch failed after retries or ran past the call's 50-second time budget. They are not deleted or missing and may load on a later call: retry the page with the same offset, or pass an ID to hn_get_thread to fetch that story alone. Absent when every item on the page loaded. | |
| truncated | No | True when more stories remain beyond this page (hasMore). Absent on the last page of the feed. |