Skip to main content
Glama

get_discussion

Read-only

Reads a Hacker News comment thread in one call, returning the story and comments breadth-first with truncation details so you can survey opinions or follow arguments in depth.

Instructions

Read a Hacker News comment thread in one call.

Returns the story plus a flat list of comments ordered breadth-first: all top-level replies, then all of their replies, and so on. HN ranks kids by its own ordering, so breadth-first spends the comment budget on the highest-ranked comments across the whole thread rather than exhausting it inside one argument.

Nesting is carried by each comment's depth rather than by nested objects, so the list can be cut at any point and stay valid.

Popular threads are wide - often over a hundred top-level comments - so max_top_level bounds how many of them are opened. That is what leaves budget for replies: without it the comment cap is spent entirely on opening statements and no reply is ever reached. Lower it to read an argument in depth, raise it to survey opinions broadly.

Big threads will not fit. When anything is omitted, truncated is true and truncation_hint names which argument to raise and why. comments_with_hidden_replies counts how many returned comments have replies that were left out, and top_level_shown against top_level_total shows how much of the first level you are seeing.

Deleted and dead comments are skipped entirely.

Input Schema

NameRequiredDescriptionDefault
story_idYes
max_depthNoHow deep to descend. 0 is top-level replies only, 2 is a good default for getting the sense of a thread.
max_commentsNoHard cap on total comments returned.
comment_charsNoPer-comment character cap.
max_top_levelNoHow many top-level comments to open. Low values leave budget for replies and give conversation; high values give a survey of opinions with few replies.

Output Schema

NameRequiredDescriptionDefault
storyYes
commentsYesFlat list ordered breadth-first. Use each comment's `depth` to reconstruct nesting.
returnedYesComments in this response.
truncatedYesTrue when comments were omitted by a depth or count cap.
top_level_shownYesTop-level comments included, bounded by max_top_level.
top_level_totalYesTop-level comments the story actually has.
total_in_threadNoComments in the whole thread, including omitted.
truncation_hintNoWhen truncated, names the argument to raise to see more.
comments_with_hidden_repliesYesReturned comments that have replies not included here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond readOnlyHint/openWorldHint: breadth-first ordering, depth carried as a field rather than nesting, deleted/dead comments skipped entirely, and exactly how truncation manifests. The truncation contract (truncated flag, truncation_hint, comments_with_hidden_replies, top_level_shown vs top_level_total) is precisely the behavioral context annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and ordering, then parameters, then truncation, then exclusions — a sensible arc with no filler sentences. It runs longer than most definitions need and the truncation paragraph restates fields the output schema likely already names.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter read tool with annotations and an output schema, everything an agent needs is present: what comes back, in what order, how to tune the budget, and how to detect partial results. Nothing material is left to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 80%, so the baseline would be 3, but the description adds genuine meaning to max_top_level by explaining the budget trade-off against max_comments ("without it the comment cap is spent entirely on opening statements"). story_id and comment_chars get no added treatment.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ("Read a Hacker News comment thread in one call") and clarifies the return shape ("the story plus a flat list of comments"), which implicitly separates it from get_story. It never names a sibling explicitly, so the boundary with get_story is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete operational guidance: lower max_top_level to read an argument in depth, raise it to survey opinions broadly, and notes big threads will not fit. It stops short of saying when to reach for get_discussion instead of get_story or search_stories.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.