Skip to main content
Glama
sam3690
by sam3690

Search Stories

search_stories

Search Hacker News stories by relevance using queries, tags, and numeric filters to find content matching specific criteria.

Instructions

Search Hacker News stories by relevance. Returns stories matching the query, sorted by relevance score, points, and comment count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query text. Can be empty to get all stories matching tags/filters.
tagsNoOptional filter tags. Comma-separated for AND logic, use parentheses for OR: 'story', 'show_hn', 'ask_hn', 'front_page', 'author_USERNAME'. Example: 'author_pg,(story,poll)'
numericFiltersNoOptional numeric filters: 'created_at_i>X', 'points>=Y', 'num_comments>=Z'. Comma-separated for AND.
pageNoPage number (0-indexed)
hitsPerPageNoResults per page

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hitsYes
pageYes
nbHitsYes
nbPagesYes
hitsPerPageYes
processingTimeMSYes
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: it's a search operation that returns matching stories sorted by specific criteria. However, it doesn't mention pagination behavior (implied by page/hitsPerPage parameters), rate limits, authentication needs, or what happens with empty queries. The description adds value but doesn't fully compensate for the lack of annotations.

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?

Two sentences that efficiently convey purpose and behavior with zero waste. The first sentence states what the tool does, the second describes the return behavior. Every word earns its place in this well-structured description.

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 tool's moderate complexity (5 parameters, search functionality), no annotations, but 100% schema coverage and an output schema exists, the description is reasonably complete. It covers the core purpose and sorting behavior. The output schema will handle return values, so the description doesn't need to explain those. It could benefit from more behavioral context given the lack of annotations.

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 5 parameters thoroughly. The description adds minimal value beyond the schema - it mentions query, tags, and numeric filters but doesn't provide additional semantic context. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 clearly states the specific action ('Search Hacker News stories by relevance'), resource ('stories'), and distinguishes from siblings by specifying relevance-based search rather than date-based (search_by_date) or category-specific (get_ask_hn, get_show_hn). It explicitly mentions the sorting criteria (relevance score, points, comment count).

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 provides clear context for when to use this tool (searching by relevance with query, tags, and numeric filters), but doesn't explicitly state when NOT to use it or name specific alternatives. The sibling tools suggest alternatives like search_by_date for date-based searches or get_front_page for front page stories, but these aren't mentioned in the description.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sam3690/Hackernews_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server