Skip to main content
Glama

Search Hacker News stories or comments by keyword

hn_search
Read-only

Full-text search of Hacker News stories or comments through the Algolia HN API: title, URL, author, points, comment count, time and HN link; comments include their text (max 500 characters). Filters: date range (from, to as YYYY-MM-DD), minimum points, sort by relevance or date. Covers the public HN index only; limit max 25. Related tools on this server, for a different need: hn when you need to search Hacker News stories and comments or the front page. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "q": "<q>"
    },
    "name": "hn_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesSearch words (1-200 characters)
toNoLatest creation date YYYY-MM-DD (optional)
fromNoEarliest creation date YYYY-MM-DD (optional)
sortNorelevance (default) or date (newest first)
typeNostory (default) or comment
limitNoResults, 1-25 (default 10)
minPointsNoMinimum points (default 0)

Output Schema

NameRequiredDescriptionDefault
sortNo
typeNo
countNo
queryNo
nbHitsNo
sourceNo
resultsNo
checkedAtNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior5/5

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

Beyond readOnlyHint/openWorldHint, the description discloses that results come from the public HN index only, that comment text is truncated to 500 characters, that limit caps at 25, and that each successful call costs $0.002 via x402 with failed calls free. Cost and payment mechanism plus result truncation are meaningful behavioral facts an agent cannot get from annotations or schema.

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?

Purpose, filters, scope, and pricing are front-loaded in a tight, information-dense paragraph with no filler. The sibling sentence is the one piece that does not earn its place, since it restates this tool's own function instead of distinguishing 'hn'.

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

Completeness4/5

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

Given an output schema, the description does not need to enumerate return fields, yet it still covers scope, truncation, result cap, and billing, which is more than adequate for a search tool. Minor gaps: no mention of pagination beyond the hard limit of 25 and no rate-limit or failure-mode detail beyond the no-charge note.

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?

Schema description coverage is 100%, so the schema already documents all seven parameters including formats and defaults. The description mostly restates those same filters (YYYY-MM-DD, relevance/date, min points) and adds little beyond reinforcing the 25-result cap, so baseline 3 applies.

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?

The first sentence names a specific verb and resource ('Full-text search of Hacker News stories or comments') plus the backing data source (Algolia HN API), and the field list clarifies the result shape. The only weakness is sibling differentiation: the 'hn' pointer describes the same job ('search Hacker News stories and comments or the front page'), so an agent cannot cleanly separate the two from this text.

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

Usage Guidelines3/5

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

It states the filters available (date range, minimum points, sort) and the scope limit ('public HN index only; limit max 25'), which implies when the tool fits. However, the explicit alternative guidance is muddled: 'hn' is recommended 'when you need to search Hacker News stories and comments', which is exactly what this tool does, so no real when-not-to-use condition is established.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources