Hacker News adapter for browserkit — top stories, new, ask, show, jobs
Five tools with clear verb-noun naming (get_*) and consistent parameter schemas. All tools have descriptions (10 - 100 chars) and input schemas with type constraints. Strengths: consistent naming convention, proper use of Zod for validation, count parameter bounded 1 - 30, comments tool accepts both ID and URL formats. Weaknesses: descriptions are terse (avg 65 chars, below 194-char baseline); no output schema documentation; no error handling guidance; no parameter descriptions beyond count/id; missing idempotency/destructiveness hints.
Get posts from HN's Ask page (includes Ask HN, Tell HN, and related posts)
Get top-level comments for a Hacker News story by its ID or URL
Get the newest submissions on Hacker News
Get Show HN posts
Get the top stories from the Hacker News front page
Output schema not documented. Tools return JSON-stringified Story[] and Comment[] objects, but LLMs cannot infer field types (rank, points, ageIso, etc.) without explicit schema. Agents cannot reliably extract or chain results.
Descriptions are terse (avg 65 chars vs 194-char baseline). 'Get the top stories from the Hacker News front page' lacks context on when to use this vs get_new/get_ask/get_show, what fields are returned, or prerequisites. LLMs cannot reliably select the right tool.
Parameter 'count' lacks description in schema. Zod .describe() is present in code but not visible in tool registration. LLMs see only type/min/max without context on what 'count' controls or why 1 - 30 is the range.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 53 | 2026-07-28+ | v2 |
No error handling guidance. If page.goto() times out, scrapeStories() fails, or HN changes selectors, tools return raw errors. LLMs receive no recovery hints (retry, fallback, or user action).
No tool annotations (readOnlyHint, idempotentHint). All tools are read-only and idempotent, but LLMs cannot infer this. Agents may incorrectly treat these as stateful or destructive.