hn_discussion
Retrieve HackerNews comment threads with full reply hierarchy to surface counter-arguments and practitioner caveats. Use story IDs from top stories or search.
Instructions
Read the comment thread under a HackerNews story.
Where hn_top_stories and hn_search tell you what is being discussed, this tells you what is actually being argued — the counter-arguments, the practitioner caveats, the "we tried this in production" replies that carry the real signal. Algolia can search comment text but does not return thread structure, so this is the only way to see who replied to whom.
Get a story_id from hn_top_stories or hn_search first.
Comments are walked breadth-first, so the highest-ranked top-level comments come back first. Deleted and flagged comments are skipped. Popular threads run to several hundred comments and each one costs a request upstream, so both depth and total count are capped — check the 'truncated' flag to see whether the thread was cut short.
Args: params (HnDiscussionInput): - story_id (int): HackerNews item ID - max_depth (int): Reply nesting levels (1–4, default 2) - max_comments (int): Total comment budget (1–100, default 25) - text_chars (int): Per-comment text truncation (100–2000)
Returns: str: JSON with story{}, total_comments (as reported by HN), fetched_comments, truncated, comments[]. Each comment: id, by, posted, text, reply_count, replies[] (same shape, nested).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |