Skip to main content
Glama

Hn Search Content

hn_search_content
Read-only

Search Hacker News stories and comments via Algolia. Filterable by content type, author, date range, and minimum points.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination (0-indexed).
sortNoSort order. "relevance" for best match, "date" for most recent first.relevance
tagsNoFilter results by content type. Omit to search all types.
viewNoHow much of each hit to return. "full" includes every field. "compact" omits the two body-text fields — `text` and `highlights.text` — which together can repeat a long comment twice per hit; everything else (id, title, url, domain, author, points, comment count, timestamp, parent story, title highlight, matchedWords) is unchanged. Use "compact" to scan many results, then pass a hit id to hn_get_thread to read the body you skipped.full
countNoNumber of results to return.
queryYesSearch terms. Supports simple keywords — Algolia handles stemming and relevance. Trimmed before searching; blank or whitespace-only input is rejected.
authorNoFilter results to a specific author. Useful for finding a user's posts on a topic (hn_get_user only shows recent submissions). Trimmed before filtering; omit the field to search all authors rather than passing a blank string.
dateRangeNoFilter to a date window. Useful for finding discussions about recent events.
minPointsNoMinimum score/points. Filters out low-engagement content.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe count cap that was applied.
hitsNoSearch results ranked by sort order.
pageNoCurrent page number (0-indexed).
errorNoPresent when the call failed. Absent on success.
queryNoThe query that was searched.
shownNoNumber of hits returned.
noticeNoRecovery hint when results are empty — names the filters applied, for relaxing the search. Absent on non-empty result pages.
totalHitsNoTotal matching results across all pages.
truncatedNoTrue when the hit list was capped by the count parameter.
totalPagesNoNumber of pages Algolia will actually serve for this query. Not derived from totalHits — broad queries report a totalHits far larger than the reachable page range, so paginate against this value.

TDQS

A3.6/5.0
Behavior3/5

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

The annotation readOnlyHint=true already covers the main safety behavior, and the description does not contradict it. It adds the backend detail 'via Algolia' and the list of filter dimensions, but does not disclose pagination behavior, rate limits, or what happens to the search results beyond returning them. Given the annotation covers the core read-only nature, the description provides modest additional context, justifying a mid-range score.

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 two short sentences that front-load the primary action and then enumerate the key filter capabilities. Every word contributes meaning, with no redundant filler. It is appropriately sized for the tool's purpose and does not repeat schema information.

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 the output schema exists, the description does not need to explain return values. It covers the core function (search) and the available filter dimensions, which is sufficient. It does not provide guidance on when to use it relative to siblings, but that is a usage-guideline concern already scored separately. For a search tool with a rich schema, the description is adequately complete.

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%, and each parameter (query, author, dateRange, minPoints, tags, sort, view, count, page) already has a detailed description. The tool description only lists a subset of filter dimensions ('content type, author, date range, and minimum points') without adding any new semantic detail. Since the schema fully documents the parameters, the description adds no extra value beyond restating them, so a baseline 3 is appropriate.

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 states the specific action ('Search'), the target resource ('Hacker News stories and comments'), and the search backend ('via Algolia'). It clearly differentiates from sibling tools: hn_get_stories and hn_get_thread retrieve specific items, while hn_get_user returns user info, none of which do keyword search. The mention of filters adds further scope.

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

Usage Guidelines2/5

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

No explicit guidance is given on when to use this tool versus the siblings. It does not state that this is for keyword-driven discovery as opposed to retrieving by ID, nor does it mention any condition to prefer another tool. The only implicit signal is the name and the presence of a 'query' parameter, which is insufficient for an agent to reliably pick between this and hn_get_stories.

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.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a clearly distinct resource: feed stories, threaded items, user profiles, and content search. No overlap exists; an agent can easily select the appropriate tool for a given intent.

Naming Consistency5/5

All tools follow a uniform `hn_` prefix with a consistent verb_noun pattern (`get_stories`, `get_thread`, `get_user`, `search_content`). The naming is intuitive and predictable.

Tool Count5/5

Four tools is well-scoped for a Hacker News read-only server, covering core data access patterns without redundancy. Each tool earns its place, and the count is neither too thin nor bloated.

Completeness4/5

The surface covers fetching stories, retrieving item trees, viewing user profiles, and searching content. Minor gaps exist (e.g., no direct way to list a user's comments, no explicit single-item fetch beyond depth-0 thread), but agents can work around them using the thread tool.