Skip to main content
Glama

Search Hackernews

search_hackernews

Search Hacker News for stories matching your query, returning each result's title, URL, points, author, and comment count. Useful for finding discussions or trending topics by relevance or date.

Instructions

Search Hacker News stories and return a list of matching story dicts, each with title, url, points, author (username), and num_comments (comment count).

Queries the public Hacker News search index (Algolia HN API) over the network; makes no local changes. Returns an empty list when nothing matches or the query is empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNoResult ordering; type: string; one of "relevance" or "date" ("date" sorts most recent first); example: "date"; default: "relevance".relevance
tagsNoAlgolia HN tag filter; type: string; common values "story", "comment", "show_hn", "ask_hn", "poll", "job"; example: "show_hn"; default: "story".story
queryYesSearch terms to match against story titles and text; type: string; example: "rust async runtime"; no default (required).
max_resultsNoMaximum number of stories to return; type: integer; example: 10; default: 20.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
countNo
errorsNo
scraperNo
source_urlsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.6
    • addedInput schema / properties / tags
      Added value: +{
      +  "default": "story",
      +  "description": "Algolia HN tag filter; type: string; common values \"story\", \"comment\", \"show_hn\", \"ask_hn\", \"poll\", \"job\"; example: \"show_hn\"; default: \"story\".",
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / by / description
      Previous value: -"\"relevance\" (default) or \"date\" (most recent first)."New value: +"Result ordering; type: string; one of \"relevance\" or \"date\" (\"date\" sorts most recent first); example: \"date\"; default: \"relevance\"."
    • changedInput schema / properties / max_results / description
      Previous value: -"Max stories to return (default 20)."New value: +"Maximum number of stories to return; type: integer; example: 10; default: 20."
    • changedInput schema / properties / query / description
      Previous value: -"Search query."New value: +"Search terms to match against story titles and text; type: string; example: \"rust async runtime\"; no default (required)."
  3. Changed20 schema fields changedv1.3.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / by / description
      Added value: +"\"relevance\" (default) or \"date\" (most recent first)."
    • removedInput schema / properties / by / title
      Removed value: -"By"
    • addedInput schema / properties / max_results / description
      Added value: +"Max stories to return (default 20)."
    • removedInput schema / properties / max_results / title
      Removed value: -"Max Results"
    • addedInput schema / properties / query / description
      Added value: +"Search query."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / title
      Removed value: -"search_hackernewsArguments"
    • removedOutput schema / $defs
      Removed value: -{
      -  "ToolError": {
      -    "description": "A non-fatal problem encountered while scraping.",
      -    "properties": {
      -      "message": {
      -        "title": "Message",
      -        "type": "string"
      -      },
      -      "url": {
      -        "title": "Url",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "url",
      -      "message"
      -    ],
      -    "title": "ToolError",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / count / title
      Removed value: -"Count"
    • removedOutput schema / properties / data / title
      Removed value: -"Data"
    • removedOutput schema / properties / errors / items / $ref
      Removed value: -"#/$defs/ToolError"
    • addedOutput schema / properties / errors / items / description
      Added value: +"A non-fatal problem encountered while scraping."
    • addedOutput schema / properties / errors / items / properties
      Added value: +{
      +  "message": {
      +    "type": "string"
      +  },
      +  "url": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / errors / items / required
      Added value: +[
      +  "url",
      +  "message"
      +]
    • addedOutput schema / properties / errors / items / type
      Added value: +"object"
    • removedOutput schema / properties / errors / title
      Removed value: -"Errors"
    • removedOutput schema / properties / scraper / title
      Removed value: -"Scraper"
    • removedOutput schema / properties / source_urls / title
      Removed value: -"Source Urls"
    • removedOutput schema / title
      Removed value: -"ScrapeToolResult"
  4. Addedv1.3.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a good job: it discloses that the tool is a read-only network query ('makes no local changes', 'queries the public Hacker News search index'), and it specifies the empty-list behavior for empty queries and no matches. It omits potential rate limits or error behavior, but those are not critical for a simple search tool.

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

Conciseness5/5

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

The description is three concise sentences with no fluff. It front-loads the purpose and return shape, then gives network/read-only behavior, then the empty-result edge case. Every sentence contributes distinct, useful information.

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 low-complexity tool with full parameter schema coverage and an output schema, the description is complete enough: it explains result field names, clarifies network access and safety, and defines edge behavior. An agent can confidently select and invoke this tool without additional context.

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

Parameters3/5

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

All four parameters are already fully documented in the input schema with descriptions, defaults, and examples (100% schema coverage), so the baseline is 3. The description adds no additional meaning for by, tags, query, or max_results beyond what the schema already states.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Search Hacker News stories and return a list of matching story dicts'. This clearly distinguishes it from sibling search tools like search_images, search_github, and search_books by naming the exact content domain and result format.

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?

The description establishes clear usage context by stating this searches the public Hacker News index over the network. It does not explicitly name alternatives or exclusions, but the tool's resource is unique among siblings, so a 'when to use' statement is mostly implicit in the name and first sentence.

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