Skip to main content
Glama
Riddhimaan-Senapati

unofficial-HackerNews-MCP-CLI

Get item

get_item
Read-onlyIdempotent

Fetch a specific HackerNews item by ID, covering stories, comments, jobs, polls, and poll options. Returns null if the ID doesn't exist, and offers optional plain-text stripping.

Instructions

Get a single HackerNews item (story, comment, job, poll, or poll option).

Returns null if no item exists with that id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYesThe item's numeric id.
strip_htmlNoReturn plain text instead of HTML in text and title.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / strip_html
      Added value: +{
      +  "default": false,
      +  "description": "Return plain text instead of HTML in text and title.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv0.2.0
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "description": "A HackerNews item: story, comment, job, poll, or poll option.",
      +    "properties": {
      +      "by": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The username of the item's author."
      +      },
      +      "dead": {
      +        "anyOf": [
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "True if the item is dead."
      +      },
      +      "deleted": {
      +        "anyOf": [
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "True if the item is deleted."
      +      },
      +      "descendants": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "In the case of stories or polls, the total comment count."
      +      },
      +      "hn_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Canonical HackerNews discussion link.",
      +        "readOnly": true
      +      },
      +      "id": {
      +        "description": "The item's unique id.",
      +        "type": "integer"
      +      },
      +      "kids": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "integer"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The ids of the item's comments, in ranked display order."
      +      },
      +      "parent": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The comment's parent: either another comment or the story."
      +      },
      +      "parts": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "integer"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "A list of related pollopts, in display order."
      +      },
      +      "poll": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The pollopt's associated poll."
      +      },
      +      "score": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The story's score, or poll option votes."
      +      },
      +      "text": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The comment, story or poll text (HTML)."
      +      },
      +      "time": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Creation date, in Unix time."
      +      },
      +      "title": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The title of the story, poll or job (HTML)."
      +      },
      +      "type": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "job",
      +              "story",
      +              "comment",
      +              "poll",
      +              "pollopt"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "One of 'job', 'story', 'comment', 'poll', 'pollopt'."
      +      },
      +      "url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The URL of the story."
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "hn_url"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. First observedv0.1.0

TDQS

A4.1/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 openWorldHint=true, so the safety profile is covered. The description adds a specific behavioral detail—returns null if no item exists—which is not in the annotations and is valuable for an agent deciding how to handle missing data.

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 concise sentences, front-loaded with the core purpose and followed by a key behavioral note. There is no redundancy or irrelevant information, making it efficient for an agent to parse.

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?

The tool is simple with only two well-documented parameters, an output schema exists (so return structure is covered), and the description covers purpose and null behavior. Given the low complexity and rich annotations, nothing essential is missing.

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%, with both parameters (item_id and strip_html) already described in the input schema. The description does not add any parameter-level detail beyond the schema, so it meets the baseline of 3.

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 action ('Get') and the resource ('a single HackerNews item'), and explicitly enumerates the item types (story, comment, job, poll, or poll option), which differentiates it from sibling tools like get_stories or get_comments. It also notes the null return for nonexistent ids, adding precision.

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 single-item usage via the word 'single', which distinguishes it from get_items, but it does not explicitly state when to use this tool over alternatives or provide any exclusions. The guidance is implied rather than explicit.

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