Skip to main content
Glama

Get Top Stories

get_top_stories
Read-onlyIdempotent

Fetch the current live top-ranked Hacker News stories from the Firebase API. Returns up to count stories (default 10) with title, URL, score, author, comment count, and Unix timestamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of top stories to return (default: 10)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of top stories returned
storiesYesArray of top stories

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 top stories returned",
      +      "type": "number"
      +    },
      +    "stories": {
      +      "description": "Array of top stories",
      +      "items": {
      +        "properties": {
      +          "by": {
      +            "description": "Author username",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "descendants": {
      +            "description": "Number of comments",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "id": {
      +            "description": "HN item ID",
      +            "type": "number"
      +          },
      +          "score": {
      +            "description": "Story score/points",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "time": {
      +            "description": "Unix timestamp of story posting",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "title": {
      +            "description": "Story title",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "url": {
      +            "description": "Story URL",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "count",
      +    "stories"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "count": 10
      +  },
      +  {
      +    "count": 30
      +  }
      +]
  3. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is well covered. The description adds context about live data and the 'up to count' limitation, but does not disclose rate limits, authentication, or other behavioral details. No contradiction with 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 front-load the verb and resource, then cover the parameter behavior and return fields without redundant words. The description is efficient and well-structured.

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?

This is a simple read-only tool with one optional parameter, rich annotations, and an output schema. The description provides the essential context about live data, count limits, and return fields, leaving no critical gaps.

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

Parameters4/5

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

The schema covers the single `count` parameter with its default, but the description adds the crucial clarification that the tool returns 'up to `count` stories', implying it may return fewer. This goes beyond the schema's generic 'Number of top stories to return'.

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 description clearly states the tool fetches 'current live top-ranked Hacker News stories from the Firebase API', using a specific verb and resource. It distinguishes from siblings like get_stories by mentioning 'top-ranked' and 'live', but does not explicitly compare or contrast with alternatives.

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?

No explicit when-to-use or alternative guidance is provided. The description implies it should be used for retrieving top Hacker News stories, but does not mention exclusions or direct users to sibling tools like get_hn_comments or search_hn for other needs.

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.