Skip to main content
Glama

Search Hn

search_hn
Read-onlyIdempotent

Full-text search Hacker News via Algolia. Pass query plus optional tags filter (story, comment, ask_hn, show_hn; default: story). Returns title, URL, score, author, comment count, and timestamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoContent type filter: story, comment, ask_hn, or show_hn (default: story)
queryYesSearch query string
per_pageNoNumber of results to return (default: 10)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsYesContent type filter applied
countYesNumber of results returned
queryYesThe search query string used
resultsYesArray of search result items

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "description": "Number of results returned",
      +      "type": "number"
      +    },
      +    "query": {
      +      "description": "The search query string used",
      +      "type": "string"
      +    },
      +    "results": {
      +      "description": "Array of search result items",
      +      "items": {
      +        "properties": {
      +          "author": {
      +            "description": "Author username",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "created_at": {
      +            "description": "Creation timestamp",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "num_comments": {
      +            "description": "Number of comments",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "objectID": {
      +            "description": "Unique identifier for the HN item",
      +            "type": "string"
      +          },
      +          "points": {
      +            "description": "Story points/score",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "title": {
      +            "description": "Story title",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "url": {
      +            "description": "Story URL",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "objectID"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "tags": {
      +      "description": "Content type filter applied",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "query",
      +    "tags",
      +    "count",
      +    "results"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "query": "artificial intelligence"
      +  },
      +  {
      +    "per_page": 20,
      +    "query": "startup funding",
      +    "tags": "story"
      +  }
      +]
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds useful behavioral context: it uses Algolia, defaults to 'story' tag when not specified, and lists the return fields (title, URL, score, author, comment count, timestamp). This goes beyond the annotations without contradicting them.

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 sentences that front-load the core purpose, then detail parameters and return fields. Every sentence adds value, and there is no redundant or overly verbose language.

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 and that an output schema exists, the description covers the essential aspects: the query, optional tag filtering, and return fields. It does not mention sorting or pagination explicitly, but these are captured in the schema. The combination of annotations and description is sufficient for a functional understanding.

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% for all three parameters, each already having clear descriptions. The description reinforces the tags parameter by restating the default but does not add new semantic meaning beyond what the schema provides. The baseline of 3 applies because 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 'Full-text search Hacker News via Algolia', using a specific verb and resource. It distinguishes the tool from siblings like get_stories or get_top_stories, which are retrieval tools for specific story sets, while search_hn is the general search entry point.

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?

The description implies usage by stating how to construct a query with optional tags, but it does not explicitly mention when to prefer this tool over alternatives like search_within or get_hn_comments. No exclusion criteria or alternative recommendations are provided, leaving usage guidance mostly implicit.

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.