@cyanheads/hn-mcp-server 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/AGENTS.md +2 -2
  2. package/CLAUDE.md +2 -2
  3. package/README.md +17 -18
  4. package/changelog/0.7.x/0.7.0.md +32 -0
  5. package/dist/mcp-server/tools/definitions/get-stories.tool.d.ts +1 -0
  6. package/dist/mcp-server/tools/definitions/get-stories.tool.d.ts.map +1 -1
  7. package/dist/mcp-server/tools/definitions/get-stories.tool.js +31 -24
  8. package/dist/mcp-server/tools/definitions/get-stories.tool.js.map +1 -1
  9. package/dist/mcp-server/tools/definitions/get-thread.tool.d.ts +3 -1
  10. package/dist/mcp-server/tools/definitions/get-thread.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/get-thread.tool.js +227 -277
  12. package/dist/mcp-server/tools/definitions/get-thread.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/get-user.tool.d.ts +0 -1
  14. package/dist/mcp-server/tools/definitions/get-user.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/get-user.tool.js +27 -73
  16. package/dist/mcp-server/tools/definitions/get-user.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/search-content.tool.d.ts +3 -16
  18. package/dist/mcp-server/tools/definitions/search-content.tool.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/search-content.tool.js +62 -127
  20. package/dist/mcp-server/tools/definitions/search-content.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/username-input.d.ts +23 -0
  22. package/dist/mcp-server/tools/username-input.d.ts.map +1 -0
  23. package/dist/mcp-server/tools/username-input.js +30 -0
  24. package/dist/mcp-server/tools/username-input.js.map +1 -0
  25. package/dist/services/hn/hn-service.d.ts +49 -8
  26. package/dist/services/hn/hn-service.d.ts.map +1 -1
  27. package/dist/services/hn/hn-service.js +55 -9
  28. package/dist/services/hn/hn-service.js.map +1 -1
  29. package/package.json +2 -2
  30. package/server.json +3 -3
  31. package/skills/hn-guide/SKILL.md +4 -4
  32. package/dist/mcp-server/tools/response-budget.d.ts +0 -111
  33. package/dist/mcp-server/tools/response-budget.d.ts.map +0 -1
  34. package/dist/mcp-server/tools/response-budget.js +0 -204
  35. package/dist/mcp-server/tools/response-budget.js.map +0 -1
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** hn-mcp-server
4
- **Version:** 0.6.1
4
+ **Version:** 0.7.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.22`
6
6
  **Engines:** Bun ≥1.4.4, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` 2.4.0
@@ -220,9 +220,9 @@ src/
220
220
  types.ts # HN domain types
221
221
  mcp-server/
222
222
  tools/markdown-escape.ts # format() boundary: escape titles, quote bodies
223
- tools/response-budget.ts # 64,000-byte budget per response surface: measure both surfaces, largest shared body cut, code-point cut
224
223
  tools/served-at-cap.ts # notice sentence for a size input served at its per-call cap
225
224
  tools/thread-cursor.ts # hn_get_thread cursor codec: packed frontier, JSON format still decoded
225
+ tools/username-input.ts # shared input schema for an HN account name: username and author
226
226
  tools/definitions/
227
227
  get-stories.tool.ts # hn_get_stories — Fetch stories from an HN feed
228
228
  get-thread.tool.ts # hn_get_thread — Get item + comment tree
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** hn-mcp-server
4
- **Version:** 0.6.1
4
+ **Version:** 0.7.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.22`
6
6
  **Engines:** Bun ≥1.4.4, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` 2.4.0
@@ -220,9 +220,9 @@ src/
220
220
  types.ts # HN domain types
221
221
  mcp-server/
222
222
  tools/markdown-escape.ts # format() boundary: escape titles, quote bodies
223
- tools/response-budget.ts # 64,000-byte budget per response surface: measure both surfaces, largest shared body cut, code-point cut
224
223
  tools/served-at-cap.ts # notice sentence for a size input served at its per-call cap
225
224
  tools/thread-cursor.ts # hn_get_thread cursor codec: packed frontier, JSON format still decoded
225
+ tools/username-input.ts # shared input schema for an HN account name: username and author
226
226
  tools/definitions/
227
227
  get-stories.tool.ts # hn_get_stories — Fetch stories from an HN feed
228
228
  get-thread.tool.ts # hn_get_thread — Get item + comment tree
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.6.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/hn-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-2.4.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/hn-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/hn-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun->=1.4.4-f9f1e1.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.7.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/hn-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-2.4.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/hn-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/hn-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun->=1.4.4-f9f1e1.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -51,39 +51,38 @@ Hacker News feeds, threads, and profiles. Browse ranked feeds, read full comment
51
51
  ### `hn_get_stories` <sub>tool</sub>
52
52
 
53
53
  - Six feed types: `top`, `new`, `best`, `ask`, `show`, `jobs`; `count` (default 30) and `offset` for pagination. One call serves at most 100 stories; a `count` up to 1,000 is served at 100, with a `notice` naming the next `offset`
54
- - Returns id, type, title, url, domain, score, author, timestamp, comment count, and body text — each field omitted (not null) when HN doesn't provide it
55
- - Enrichment reports `total`, `offset`, and `hasMore`; while more stories remain, `truncated` is set and `notice` names the next `offset`, and a `notice` explains empty pages (empty feed, offset past end, or every item on the page deleted/flagged). The last page carries no truncation
54
+ - Returns rank, id, type, title, url, domain, score, author, timestamp, comment count, and body text — each field but `rank`, `id`, and `type` omitted (not null) when HN doesn't provide it. `rank` is the story's 1-based position in the feed across pages, counted before omitted or failed items drop out, so a gap between consecutive ranks marks one
55
+ - Enrichment reports `total`, `offset`, and `hasMore`; while more stories remain, `truncated` is set and `notice` names the next `offset`, and a `notice` explains empty pages (empty feed, offset past end, or no live item on the page). On every page that drops deleted, dead, or missing items, the final one included, `notice` counts them by kind. The last page carries no truncation
56
56
  - Items whose fetch failed after retries, or ran past the call's 50-second time budget, are listed in `failedIds` with a `notice` naming the retry; a page where every item failed returns the classified error of its dominant cause instead of an empty list: `upstream_rate_limited` when any item was rate-limited, otherwise the most frequent declared upstream reason, or `upstream_no_response` (`Timeout`) when no answer from the HN API at all was the most common failure
57
57
 
58
58
  ---
59
59
 
60
60
  ### `hn_get_thread` <sub>tool</sub>
61
61
 
62
- - `itemId` plus `depth` (default 3; 0 returns the item with no comments) and `maxComments` (default 50) capping one response across all levels, alongside a fixed 64,000-byte budget on each response surface (all `content[]` text, `nextCursor` included, and the `structuredContent` JSON) that cuts only between comments and always returns a page's first comment whole. One call resolves at most 10 levels and 200 comments; a `depth` up to 100 is served at 10 and a `maxComments` up to 1,000 at 200, with a `notice` naming the comment to pass as `itemId` or the `nextCursor` that reaches the rest
62
+ - `itemId` plus `depth` (default 3; 0 returns the item with no comments) and `maxComments` (default 25) capping one response across all levels; every comment is returned whole. One call resolves at most 10 levels and 200 comments; a `depth` up to 100 is served at 10 and a `maxComments` up to 1,000 at 200, with a `notice` naming the comment to pass as `itemId` or the `nextCursor` that reaches the rest
63
63
  - Breadth-first traversal ranked like HN — top-ranked top-level comments resolve first, replies fill in only after the level above is exhausted
64
- - Resumable: a response stopped by `maxComments`, the byte budget, an upstream rate limit, or the call's 50-second time budget returns `nextCursor`; passing it back as `cursor` with the same `itemId` continues at the next unseen comment. The cursor carries the unvisited comments themselves, so re-ranked replies cannot shift it, and the server keeps no session state. A cursor the tool did not issue, an altered one, or one passed with a different `itemId` fails with `invalid_cursor`
65
- - The root carries its relationships and state: `parent` and `storyId` (the story or poll the discussion belongs to) for a comment, `poll` for a poll option, `parts` and resolved `options` (text and votes, at every depth) for a poll, and `deleted`/`dead` markers. The `content[]` heading names the type — a title, `Comment by <author>`, `Poll option by <author> on poll <id>` — and marks a deleted or dead root
64
+ - Resumable: a response stopped by `maxComments`, an upstream rate limit, or the call's 50-second time budget returns `nextCursor`; passing it back as `cursor` with the same `itemId` continues at the next unseen comment. The cursor carries the unvisited comments themselves, so re-ranked replies cannot shift it, and the server keeps no session state. A cursor the tool did not issue, an altered one, or one passed with a different `itemId` fails with `invalid_cursor`
65
+ - The root carries its relationships and state: `parent`, `storyId` (the story or poll the discussion belongs to), and, when that story is found, `storyTitle` and `storyUrl` (absent for a text post) for a comment, `childCount` (its direct replies, dead and deleted included) at every `depth`, `poll` for a poll option, `parts` and resolved `options` (text and votes, at every depth) for a poll, and `deleted`/`dead` markers. The `content[]` heading names the type — a title, `Comment by <author>`, `Poll option by <author> on poll <id>` — and marks a deleted or dead root
66
66
  - Flat comment list carries `depth`/`parentId` for tree reconstruction, plus `childCount` and an `isOp` flag when the comment author submitted the thread's story — on a comment root, the story at `storyId`, never the comment's own author. Dead and deleted comments are left out, but their live replies are still returned at their true `depth`, with `parentId` naming the omitted comment
67
- - `truncated` and `truncationReason` (`count`, `size`, `rate_limited`, `time`, or `depth` when replies lie below the depth limit) are set only while comments remain unread — never on a terminal page, including a thread that loads in full at exactly the cap. `notice` reports deleted/dead comments omitted during traversal and the next step: the cursor, or a larger `depth` or a comment id as `itemId`, naming by ID any omitted comment whose replies the depth limit cut
67
+ - `truncated` and `truncationReason` (`count`, `rate_limited`, `time`, or `depth` when replies lie below the depth limit, at `depth: 0` any reply of the root) are set only while comments remain unread — never on a terminal page, including a thread that loads in full at exactly the cap. `notice` reports deleted/dead comments omitted during traversal and the next step: the cursor, or a larger `depth` or a comment id as `itemId`, naming by ID any omitted comment whose replies the depth limit cut
68
68
  - Comments and poll options whose fetch failed after retries or ran past the call's time budget are listed in `failedIds`, and `notice` names them with the retry; failed comments ride in `nextCursor`, so paging on retries them rather than skipping them. The root item is still returned, and a failure is never passed off as a `maxComments`/`depth` limit
69
69
 
70
70
  ---
71
71
 
72
72
  ### `hn_get_user` <sub>tool</sub>
73
73
 
74
- - `username` is case-sensitive and trimmed; `includeSubmissions` (default false) resolves recent submissions, with `submissionCount` (default 10) and `submissionOffset` paging through a long history. One call resolves at most 50 submissions; a `submissionCount` up to 1,000 is served at 50, with a `notice` naming the next `submissionOffset`
75
- - Profile includes karma, creation date, and about text (HTML stripped); submissions filter out dead/deleted items
74
+ - `username` is case-sensitive, trimmed, and loses one leading `@` (`@pg` looks up `pg`); a name that still holds whitespace is rejected as a display name before any upstream call; `includeSubmissions` (default false) resolves recent submissions, with `submissionCount` (default 10) and `submissionOffset` paging through a long history. One call resolves at most 50 submissions; a `submissionCount` up to 1,000 is served at 50, with a `notice` naming the next `submissionOffset`
75
+ - Profile includes karma, creation date, and about text (HTML stripped); submissions filter out dead/deleted items, and `notice` counts what a window drops, by kind
76
76
  - A comment submission carries its `parent` and a poll-option submission its `poll`, so either links back to what it answered
77
77
  - Enrichment echoes `submissionOffset` and the offset to send next, or a notice when the requested offset is past the end of the history
78
78
  - Submissions whose fetch failed after retries, or that the call's 50-second time budget cut, are listed in `failedIds` with a `notice` naming the retry (and the budget, when it cut them); a window where every submission failed returns the classified error of its dominant cause, as `hn_get_stories` does, with `upstream_no_response` (`Timeout`) when no answer was the most common failure, the budget cutting them all included
79
- - A final window whose submissions are all dead, deleted, or absent gets a `notice` saying so, with the `submissionOffset` and `total`
80
- - Each response surface is held to a fixed 64,000-byte budget: an over-budget page keeps every submission and cuts the longest bodies to one shared length, flagging each with `textTruncated` and pointing to `hn_get_thread` for the whole text
79
+ - A final window that drops dead, deleted, or absent submissions gets a `notice` counting them by kind, with no next-offset hint; one with none live also gets the `submissionOffset` and `total`
81
80
 
82
81
  ---
83
82
 
84
83
  ### `hn_search_content` <sub>tool</sub>
85
84
 
86
- - Free-text `query` — typo-tolerant, with the last term also matching as a prefix; wrap a term in double quotes to match it exactly and put `-` before one to exclude it — plus `tags` (`story`/`comment`/`poll`/`job`/`ask_hn`/`show_hn`/`front_page`), `author` (the exact, case-sensitive username), `storyId`, `dateRange`, `minPoints`, and `minComments` filters; `sort` by relevance or date; `count` (default 30) and `page` for pagination. One call serves at most 50 hits; a `count` up to 1,000 is served as the page of 50 starting at the requested page's first hit, with a `notice` naming the `count: 50` page to pass next; a non-zero `page` whose first hit begins no page of 50 fails with `count_page_unaligned`, naming a `count` and `page` that start there and, when that count is under 25, the page of 50 that holds that hit
85
+ - Free-text `query` — typo-tolerant, with the last term also matching as a prefix; wrap a term in double quotes to match it exactly and put `-` before one to exclude it — plus `tags` (`story`/`comment`/`poll`/`job`/`ask_hn`/`show_hn`/`front_page`), `author` (the exact, case-sensitive username; trimmed, with one leading `@` dropped, and a name that still holds whitespace is rejected as a display name), `storyId`, `dateRange`, `minPoints`, and `minComments` filters; `sort` by relevance or date; `count` (default 10) and `page` for pagination. One call serves at most 50 hits; a `count` up to 1,000 is served as the page of 50 starting at the requested page's first hit, with a `notice` naming the `count: 50` page to pass next; a non-zero `page` whose first hit begins no page of 50 fails with `count_page_unaligned`, naming a `count` and `page` that start there and, when that count is under 25, the page of 50 that holds that hit
87
86
  - `tags: "front_page"` is the front page right now (about 30 stories), never past front pages; for an earlier window, use `tags: "story"` with `dateRange` and `minPoints`
88
87
  - `query` is optional when a filter is set — list Ask HN, Show HN, polls, or jobs on their own, or pass a story's `storyId` with `tags: "comment"` to search within one thread. No query and no filter fails with `missing_query_or_filter`
89
88
  - To check whether a page was discussed, pass its URL alone as `query`: the leading `http://`, `https://`, or `www.` is dropped before searching, so submissions under either scheme, with or without `www.`, all match. The output `query` and the notice show what was searched
@@ -91,12 +90,12 @@ Hacker News feeds, threads, and profiles. Browse ranked feeds, read full comment
91
90
  - `minPoints` applies to stories and polls — comments and jobs carry no points, so pairing it with `tags: "comment"` or `"job"` fails with `min_points_unscored_type`
92
91
  - `minComments` applies to stories and polls the same way: any value, 0 included, excludes comments, jobs, and poll options, so an untagged search returns only stories and polls, and pairing it with `tags: "comment"` or `"job"` fails with `min_comments_unscored_type`. It filters; it does not sort
93
92
  - A comment hit carries `parentId` (its story's id for a top-level comment, otherwise the parent comment's id, which `hn_get_thread` reads) and, when its story links out, `storyUrl`; in `content[]` the meta line shows `parent:<id>` and the story link sits on its own line
94
- - `view: "compact"` drops the two body-text fields (`text`, `highlights.text`), which otherwise repeat a long comment twice per hit — pass a hit id to `hn_get_thread` to read the body. In `full`, a page over 64,000 bytes per response surface drops `highlights.text` from every hit (`highlightsTextOmitted`), then cuts the longest bodies to one shared length (`textTruncated`, with an `hn_get_thread` pointer) — every hit stays
93
+ - `view: "compact"` drops the two body-text fields (`text`, `highlights.text`), which otherwise repeat a long comment twice per hit — pass a hit id to `hn_get_thread` to read the body. In `full`, every hit carries its whole body
95
94
  - Each hit carries its `type` (`story`, `comment`, `poll`, `pollopt`, `job`) when Algolia records one. Untagged searches also return poll options, which carry only an id, author, vote count, and date — `hn_get_thread` reads an option's text and poll. A poll hit has no `storyId`; its own `id` is the discussion root
96
95
  - Job descriptions come back as `text`, though keywords don't search them
97
- - Highlight metadata (`highlights.title`, `highlights.text`, `matchedWords`) shows which terms matched and where; `highlights.text` is the matched body in full with `<em>` markers
98
- - Enrichment echoes the applied `criteria` — each filter set (`author` trimmed, `dateRange` as the exclusive UTC bounds applied, to the second), plus `sort`, `count`, and `view` with defaults filled — so a saved result says what it answers
99
- - Enrichment reports `totalHits`, `page`, and the actual reachable `totalPages` — not derived from `totalHits`, since broad queries report far more hits than Algolia will serve. `totalHitsExact: false` marks `totalHits` as an estimate, and `reachableHits: 1000` marks a search that matches more than Algolia's 1,000-hit ceiling; the last page of such a search gets a notice naming the ceiling and narrower `dateRange` windows to reach the rest. While more pages remain, `truncated` is set and `notice` names the next `page`; a page past the end gets a notice naming the last valid page (or `page: 0` past the ceiling)
96
+ - Highlight metadata (`highlights.title`, `highlights.text`, `matchedWords`) shows which terms matched and where; `highlights.text` is the matched body in full with `<em>` markers, absent when Algolia returned no body highlight, which does not mean the body lacks the terms; on a hit Algolia left unhighlighted, `highlights` and `matchedWords` are absent and `text` still holds the body
97
+ - Enrichment echoes the applied `criteria` — each filter set (`author` as searched, trimmed with one leading `@` dropped, `dateRange` as the exclusive UTC bounds applied, to the second), plus `sort`, `count`, and `view` with defaults filled — so a saved result says what it answers
98
+ - Enrichment reports `totalHits`, `page`, and the actual reachable `totalPages` — not derived from `totalHits`, since broad queries report far more hits than Algolia will serve. `totalHitsExact: false` marks `totalHits` as an estimate, and `reachableHits: 1000` marks a search that matches more than Algolia's 1,000-hit ceiling; the last page of such a search gets a notice naming the ceiling and narrower `dateRange` windows to reach the rest. While more pages remain, `truncated` is set and `notice` names the next `page`; a page past the end gets a notice naming the last valid page (or `page: 0` past the ceiling). Each page a notice names comes with the `count` it is counted in unless that is the default, so the call works as written
100
99
 
101
100
  ## Features
102
101
 
@@ -112,10 +111,10 @@ HN-specific:
112
111
 
113
112
  Agent-friendly output:
114
113
 
115
- - Graceful partial failure — an item whose fetch fails after retries is reported by ID in `failedIds`, apart from deleted, dead, or nonexistent items, rather than silently shrinking the result; each `hn_get_thread`, `hn_get_stories`, and `hn_get_user` call runs under one 50-second time budget, so hung fetches cannot hold it past an MCP client's 60-second timeout; `hn_get_thread` also counts the deleted and dead comments it drops, and a rate-limited item stops the batch instead of sending every remaining item through its own retry ladder
114
+ - Graceful partial failure — an item whose fetch fails after retries is reported by ID in `failedIds`, apart from deleted, dead, or nonexistent items, rather than silently shrinking the result; each `hn_get_thread`, `hn_get_stories`, and `hn_get_user` call runs under one 50-second time budget, so hung fetches cannot hold it past an MCP client's 60-second timeout; `hn_get_thread` counts the deleted and dead comments it drops, and `hn_get_stories` and `hn_get_user` the deleted, dead, and missing items, in `notice`; a rate-limited item stops the batch instead of sending every remaining item through its own retry ladder
116
115
  - Discriminated output contracts — typed error reasons (`item_not_found`, `upstream_rate_limited`, `upstream_html`, …) with per-reason recovery text (a rate limit passes on the upstream's `Retry-After` as `retryAfter`), and a `depth`/`parentId` pair on every comment so callers reconstruct the tree without guessing nesting
117
116
  - Pagination provenance — every paged listing echoes the offset it used (`offset`, `submissionOffset`, `page`) plus the exact next-offset value in `notice`, `hn_search_content` also echoes the `criteria` it searched with, and `hn_get_thread` returns a self-contained `nextCursor`, so an agent can resume without recomputing state
118
- - Response shaping — HTML stripping, URL normalization, and domain extraction remove upstream markup noise; `hn_search_content`'s `view: "compact"` drops the two body-text fields that otherwise duplicate a hit's full text, and a 64,000-byte budget on each response surface cuts the longest bodies of an over-budget page
117
+ - Response shaping — HTML stripping, URL normalization, and domain extraction remove upstream markup noise; `hn_search_content`'s `view: "compact"` drops the two body-text fields that otherwise duplicate a hit's full text
119
118
  - Fenced upstream text — in `content[]`, every line of a body is block-quoted and titles are escaped only where they could break the surrounding Markdown, so a comment cannot pass for a server-authored line
120
119
 
121
120
  ## Getting started
@@ -0,0 +1,32 @@
1
+ ---
2
+ summary: "The 64,000-byte response budget is gone: pages hold whole records at the caller's count, and hn_get_thread maxComments and hn_search_content count now default to 25 and 10. Feed stories carry rank, omitted items are counted, thread roots report replies and story title, and `@name` usernames resolve."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.7.0 — 2026-11-13
8
+
9
+ ## Added
10
+
11
+ - **`hn_get_thread` `item.storyTitle` and `item.storyUrl` for a comment root**: the title and link of the story or poll at `storyId`. `storyUrl` is absent for a text post, and both are absent when the story can't be loaded. A continuation page fetches that story once more, so `item` matches on every page. (#60)
12
+
13
+ ## Changed
14
+
15
+ - **A page holds the count the caller asked for, never a byte cut** (#55): `hn_get_thread` stops only on `maxComments`, the 1,000-item ceiling, the time budget, a rate limit, or depth, and `hn_search_content` and `hn_get_user` bodies are always whole. The per-call caps stay at 200 comments, 50 hits, and 50 submissions.
16
+ - **Defaults**: `hn_get_thread` `maxComments` 50 → 25 and `hn_search_content` `count` 30 → 10, so a `page` sent without `count` counts in tens. (#55)
17
+ - **Breaking: output fields removed** (#55): `hn_search_content` `hits[].textTruncated` and the `highlightsTextOmitted` enrichment field, `hn_get_user` `submissions[].textTruncated`, and `size` from `hn_get_thread`'s `truncationReason`. Read each body whole from `text`.
18
+ - **`hn_get_user` `username` and `hn_search_content` `author` drop one leading `@`**: `@pg` looks up and searches `pg`, and `criteria.author` shows the name as searched. (#61)
19
+ - **Breaking: `hn_search_content` `author` that holds whitespace after trimming and dropping one `@`, or is `@` alone, is rejected as `invalid_arguments`** (#61); it returned zero hits before. `hn_get_user` rejects the same forms, which already failed there as `user_not_found` or `upstream_rejected`.
20
+ - **`hn-guide` skill 1.2**: covers the `@` and display-name handling, the 25-comment default page, and hits Algolia left unhighlighted.
21
+
22
+ ## Fixed
23
+
24
+ - **`hn_get_thread` reports replies at `depth: 0`** (#57): `item.childCount` counts the root's direct replies on every call, dead and deleted ones included, and a root with replies now sets `truncated: true` and `truncationReason: "depth"` with a notice naming a larger `depth`.
25
+ - **`hn_get_stories` carries `stories[].rank`** (#58): the story's 1-based position in the feed, counted before omitted or failed items drop, rendered as `[rank]` in `content[]`.
26
+ - **`hn_get_user` and `hn_get_stories` count the items a page omits** (#59): `notice` reads like `3 of the 40 submissions in this window are omitted: 2 deleted, 1 dead.`, by kind (deleted, dead, missing), on final pages too.
27
+ - **`hn_search_content` page notice names `count` on every page it points to**, unless `count` is the default, and offers a larger `count` only on page 0, where the larger page still starts at hit 0.
28
+ - **`hn_search_content` `highlights` and `highlights.text` descriptions** no longer read an absent highlight as a non-match: Algolia leaves some bodies that hold every query term unhighlighted.
29
+
30
+ ## Dependencies
31
+
32
+ - Dev: `@biomejs/biome` ^2.6.6 → ^2.6.7
@@ -17,6 +17,7 @@ export declare const getStories: import("@cyanheads/mcp-ts-core").ToolDefinition
17
17
  offset: z.ZodDefault<z.ZodNumber>;
18
18
  }, z.core.$strip>, z.ZodObject<{
19
19
  stories: z.ZodArray<z.ZodObject<{
20
+ rank: z.ZodNumber;
20
21
  id: z.ZodNumber;
21
22
  type: z.ZodString;
22
23
  title: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-stories.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-stories.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAoBjE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiSrB,CAAC"}
1
+ {"version":3,"file":"get-stories.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-stories.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAqBjE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2SrB,CAAC"}
@@ -6,7 +6,7 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
6
6
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
7
  import { escapeInline, quoteBody } from '../markdown-escape.js';
8
8
  import { servedAtCap } from '../served-at-cap.js';
9
- import { CALL_BUDGET_MS, decodeHtmlEntities, extractDomain, getHnService, normalizeUrl, settlePage, stripHtml, timeBudgetCutSentence, } from '../../../services/hn/hn-service.js';
9
+ import { CALL_BUDGET_MS, decodeHtmlEntities, extractDomain, getHnService, normalizeUrl, omittedSentence, settlePage, stripHtml, timeBudgetCutSentence, } from '../../../services/hn/hn-service.js';
10
10
  /** Most stories one call serves; a larger `count` is served at this cap. */
11
11
  const COUNT_CAP = 100;
12
12
  /** Largest `count` accepted; anything above it is rejected. */
@@ -93,6 +93,9 @@ export const getStories = tool('hn_get_stories', {
93
93
  stories: z
94
94
  .array(z
95
95
  .object({
96
+ rank: z
97
+ .number()
98
+ .describe("1-based position in the feed's ranking when fetched: offset plus the story's slot on this page, counted before omitted or failed items drop out. A gap between consecutive ranks marks an item omitted as deleted, dead, or missing, or one in failedIds."),
96
99
  id: z.number().describe('Item ID — use with hn_get_thread to read comments.'),
97
100
  type: z.string().describe('Item type (story, job).'),
98
101
  title: z
@@ -154,7 +157,7 @@ export const getStories = tool('hn_get_stories', {
154
157
  notice: z
155
158
  .string()
156
159
  .optional()
157
- .describe(`Agent guidance: the offset to pass for the next page while more stories remain, the IDs that failed to load and how to retry them (naming the call's ${CALL_BUDGET_MS / 1000}-second time budget when it cut them), or why a page came back empty — offset past the end of the feed, an empty feed, or every item on the page deleted or flagged — noting when count was served at its per-call cap. Absent on the last page of a non-empty result with no failed IDs.`),
160
+ .describe(`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 ${CALL_BUDGET_MS / 1000}-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.`),
158
161
  },
159
162
  enrichmentTrailer: {
160
163
  failedIds: { render: (ids) => `**Failed to load:** ${(ids ?? []).join(', ')}` },
@@ -167,11 +170,12 @@ export const getStories = tool('hn_get_stories', {
167
170
  const count = Math.min(input.count, COUNT_CAP);
168
171
  const sliced = feedIds.slice(input.offset, input.offset + count);
169
172
  const slots = await hn.fetchItems(sliced, ctx, deadline);
170
- const { items, failedIds } = settlePage(slots);
171
- const stories = items.map((item) => {
173
+ const { live, failedIds, omitted } = settlePage(slots);
174
+ const stories = live.map(({ item, slot }) => {
172
175
  const url = normalizeUrl(item.url);
173
176
  const domain = extractDomain(url);
174
177
  return {
178
+ rank: input.offset + slot + 1,
175
179
  id: item.id,
176
180
  type: item.type,
177
181
  ...(item.title && { title: decodeHtmlEntities(item.title) }),
@@ -188,6 +192,7 @@ export const getStories = tool('hn_get_stories', {
188
192
  feed: input.feed,
189
193
  count: stories.length,
190
194
  failed: failedIds.length,
195
+ omitted,
191
196
  });
192
197
  const total = feedIds.length;
193
198
  const nextOffset = input.offset + count;
@@ -198,36 +203,39 @@ export const getStories = tool('hn_get_stories', {
198
203
  hasMore,
199
204
  ...(failedIds.length > 0 && { failedIds }),
200
205
  });
201
- const deadPageMessage = `No live stories on this page of the ${input.feed} feed (offset:${input.offset}, total:${total}). Items may have been deleted or flagged.`;
202
206
  const failureMessage = failedIds.length > 0
203
207
  ? `Could not fetch ${failedIds.length} of ${sliced.length} items on this page (id${failedIds.length === 1 ? '' : 's'} ${failedIds.join(', ')}).${timeBudgetCutSentence(slots)} Retry with offset: ${input.offset}, or pass an id as itemId to hn_get_thread to fetch that story alone.`
204
208
  : undefined;
209
+ /** A page with nothing live and nothing failed: every slot on it was omitted, which the next sentence counts. */
210
+ const emptyPage = stories.length === 0 && !failureMessage
211
+ ? `No live stories on this page of the ${input.feed} feed (offset:${input.offset}, total:${total}).`
212
+ : undefined;
213
+ const omittedMessage = omittedSentence(omitted, sliced.length, 'item', 'on this page');
205
214
  if (hasMore) {
206
215
  const raiseCount = input.count < COUNT_CAP ? `, or raise count (max ${COUNT_CAP})` : '';
207
216
  const nextPage = `Pass offset: ${nextOffset} for the next page${raiseCount}.`;
208
- const pageStatus = stories.length === 0 && !failureMessage
209
- ? deadPageMessage
210
- : `Showing items ${input.offset + 1}–${nextOffset} of ${total} in the ${input.feed} feed.`;
217
+ const pageStatus = emptyPage ??
218
+ `Showing items ${input.offset + 1}–${nextOffset} of ${total} in the ${input.feed} feed.`;
211
219
  const overCap = input.count > COUNT_CAP ? servedAtCap('count', input.count, COUNT_CAP) : '';
212
220
  ctx.enrich.truncated({
213
221
  shown: stories.length,
214
222
  cap: count,
215
- guidance: [pageStatus, overCap, failureMessage, nextPage].filter(Boolean).join(' '),
223
+ guidance: [pageStatus, omittedMessage, overCap, failureMessage, nextPage]
224
+ .filter(Boolean)
225
+ .join(' '),
216
226
  });
217
227
  }
218
- else if (stories.length === 0) {
219
- if (total === 0) {
220
- ctx.enrich.notice(`${input.feed} feed is empty.`);
221
- }
222
- else if (input.offset >= total) {
223
- ctx.enrich.notice(`Offset ${input.offset} is past the end of the ${input.feed} feed (${total} item${total === 1 ? '' : 's'}). Reset offset below ${total}.`);
224
- }
225
- else {
226
- ctx.enrich.notice(failureMessage ?? deadPageMessage);
227
- }
228
+ else if (total === 0) {
229
+ ctx.enrich.notice(`${input.feed} feed is empty.`);
230
+ }
231
+ else if (input.offset >= total) {
232
+ ctx.enrich.notice(`Offset ${input.offset} is past the end of the ${input.feed} feed (${total} item${total === 1 ? '' : 's'}). Reset offset below ${total}.`);
228
233
  }
229
- else if (failureMessage) {
230
- ctx.enrich.notice(failureMessage);
234
+ else {
235
+ /** The final page: a drop or a failure is not a pagination gap, so nothing here names a next offset. */
236
+ const notice = [emptyPage, omittedMessage, failureMessage].filter(Boolean).join(' ');
237
+ if (notice)
238
+ ctx.enrich.notice(notice);
231
239
  }
232
240
  return {
233
241
  stories,
@@ -238,8 +246,7 @@ export const getStories = tool('hn_get_stories', {
238
246
  if (result.stories.length === 0) {
239
247
  return [{ type: 'text', text: `${result.feed} feed — no stories` }];
240
248
  }
241
- const lines = result.stories.map((s, i) => {
242
- const rank = i + 1;
249
+ const lines = result.stories.map((s) => {
243
250
  const date = s.time != null
244
251
  ? `${new Date(s.time * 1000).toISOString().slice(0, 10)} (t:${s.time})`
245
252
  : null;
@@ -257,7 +264,7 @@ export const getStories = tool('hn_get_stories', {
257
264
  const text = s.text ? `\n${quoteBody(s.text)}` : '';
258
265
  const title = s.title ? escapeInline(s.title) : `[${s.type}]`;
259
266
  const domain = s.domain ? ` (${s.domain})` : '';
260
- return `[${rank}] ${title}${domain}\n${meta}${url}${text}`;
267
+ return `[${s.rank}] ${title}${domain}\n${meta}${url}${text}`;
261
268
  });
262
269
  const header = `## ${result.feed} stories`;
263
270
  return [{ type: 'text', text: `${header}\n\n${lines.join('\n\n')}` }];
@@ -1 +1 @@
1
- {"version":3,"file":"get-stories.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-stories.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAA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text: z.ZodOptional<z.ZodString>;
22
22
  score: z.ZodOptional<z.ZodNumber>;
23
23
  descendants: z.ZodOptional<z.ZodNumber>;
24
+ childCount: z.ZodNumber;
24
25
  parent: z.ZodOptional<z.ZodNumber>;
25
26
  storyId: z.ZodOptional<z.ZodNumber>;
27
+ storyTitle: z.ZodOptional<z.ZodString>;
28
+ storyUrl: z.ZodOptional<z.ZodString>;
26
29
  poll: z.ZodOptional<z.ZodNumber>;
27
30
  parts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
28
31
  deleted: z.ZodOptional<z.ZodLiteral<true>>;
@@ -106,7 +109,6 @@ export declare const getThread: import("@cyanheads/mcp-ts-core").ToolDefinition<
106
109
  count: "count";
107
110
  depth: "depth";
108
111
  rate_limited: "rate_limited";
109
- size: "size";
110
112
  time: "time";
111
113
  }>>;
112
114
  readonly nextCursor: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-thread.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-thread.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AA4nBhF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4cpB,CAAC"}
1
+ {"version":3,"file":"get-thread.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-thread.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AA+jBhF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0apB,CAAC"}