Skip to main content
Glama

Hn Get User

hn_get_user
Read-only

Get an HN user profile with karma, about, and optionally their most recent submissions resolved into full items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesHN username. Case-sensitive. Trimmed; blank or whitespace-only input is rejected.
submissionCountNoPage size — how many submissions to resolve per call. Only used when includeSubmissions is true.
submissionOffsetNoHow many submissions to skip before resolving, counting back from the most recent. Use with submissionCount to page through a long history: request offset 0, then offset submissionCount, and so on. The enrichment block echoes submissionOffset and, when more remain, the offset to send next. Only used when includeSubmissions is true.
includeSubmissionsNoResolve the user's most recent submissions into full items. Without this, only the submission count is available.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe submissionCount cap that was applied.
userNoUser profile.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of submissions returned.
noticeNoPagination context — which window of the history this page covers and the submissionOffset to send next, the submission IDs that failed to load and how to retry them, or a warning that the offset is past the end. Absent when the page reaches the end of the history with no failed IDs, or when no submissions were resolved.
failedIdsNoSubmission IDs in this window whose fetch failed after retries. They are not deleted or missing and may load on a later call: retry with the same submissionOffset, or pass an ID to hn_get_thread to fetch that item alone. Absent when every submission in the window loaded.
truncatedNoTrue when submissions remain beyond this page.
submissionsNoOne page of submissions, most recent first, starting at submissionOffset. Absent when includeSubmissions is false or the user has never submitted. Empty when the page holds no live items — either the offset is past the end, or every item in the window was deleted, flagged, or failed to load (failedIds lists the failures).
submissionOffsetNoThe offset this page started at. Absent when includeSubmissions is false or the user has never submitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedOutput schema / properties / failedIds
      Added value: +{
      +  "description": "Submission IDs in this window whose fetch failed after retries. They are not deleted or missing and may load on a later call: retry with the same submissionOffset, or pass an ID to hn_get_thread to fetch that item alone. Absent when every submission in the window loaded.",
      +  "items": {
      +    "type": "number"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Pagination context — which window of the history this page covers and the submissionOffset to send next, or a warning that the offset is past the end. Absent when the page reaches the end of the history, or when no submissions were resolved."New value: +"Pagination context — which window of the history this page covers and the submissionOffset to send next, the submission IDs that failed to load and how to retry them, or a warning that the offset is past the end. Absent when the page reaches the end of the history with no failed IDs, or when no submissions were resolved."
    • changedOutput schema / properties / submissions / description
      Previous value: -"One page of submissions, most recent first, starting at submissionOffset. Absent when includeSubmissions is false or the user has never submitted. Empty when the page holds no live items — either the offset is past the end, or every item in the window was deleted or flagged."New value: +"One page of submissions, most recent first, starting at submissionOffset. Absent when includeSubmissions is false or the user has never submitted. Empty when the page holds no live items — either the offset is past the end, or every item in the window was deleted, flagged, or failed to load (failedIds lists the failures)."
    • changedOutput schema / properties / submissions / items / description
      Previous value: -"A single submission by the user (story, comment, job, or poll)."New value: +"A single submission by the user (story, comment, job, poll, or poll option)."
    • addedOutput schema / properties / submissions / items / properties / parent
      Added value: +{
      +  "description": "For a comment, the ID of the story or comment it replied to — pass it to hn_get_thread for the context.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / submissions / items / properties / poll
      Added value: +{
      +  "description": "For a poll option, the ID of its poll.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / submissions / items / properties / type / description
      Previous value: -"Item type (story, comment, job, poll)."New value: +"Item type (story, comment, job, poll, pollopt)."
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "user"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `user_not_found`: HN reports no user account exists for the given username. `upstream_rejected`: The HN API answered with a 4xx status other than 429 — it rejected the request as built, which a username outside HN’s charset can cause. `upstream_rate_limited`: The HN API answered with HTTP 429. `upstream_unavailable`: The HN API answered with a 5xx status. `upstream_html`: The HN API served an HTML error page with a 200 status, which it does under rate limiting or maintenance. `upstream_malformed`: The HN API answered with a 200 status and a body that is not JSON. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "user_not_found",
      +            "upstream_rejected",
      +            "upstream_rate_limited",
      +            "upstream_unavailable",
      +            "upstream_html",
      +            "upstream_malformed"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "user"
      -]
  3. Changed6 schema fields changed
    • changedInput schema / properties / submissionCount / description
      Previous value: -"Number of recent submissions to resolve. Only used when includeSubmissions is true."New value: +"Page size — how many submissions to resolve per call. Only used when includeSubmissions is true."
    • addedInput schema / properties / submissionOffset
      Added value: +{
      +  "default": 0,
      +  "description": "How many submissions to skip before resolving, counting back from the most recent. Use with submissionCount to page through a long history: request offset 0, then offset submissionCount, and so on. The enrichment block echoes submissionOffset and, when more remain, the offset to send next. Only used when includeSubmissions is true.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Pagination caveat when submissions were truncated. Absent when all submissions fit within the requested count or includeSubmissions is false."New value: +"Pagination context — which window of the history this page covers and the submissionOffset to send next, or a warning that the offset is past the end. Absent when the page reaches the end of the history, or when no submissions were resolved."
    • addedOutput schema / properties / submissionOffset
      Added value: +{
      +  "description": "The offset this page started at. Absent when includeSubmissions is false or the user has never submitted.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / submissions / description
      Previous value: -"Recent submissions, most recent first. Only present when includeSubmissions is true."New value: +"One page of submissions, most recent first, starting at submissionOffset. Absent when includeSubmissions is false or the user has never submitted. Empty when the page holds no live items — either the offset is past the end, or every item in the window was deleted or flagged."
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when submissions were capped by submissionCount."New value: +"True when submissions remain beyond this page."
  4. Changed2 schema fields changed
    • changedInput schema / properties / submissionCount / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / username / description
      Previous value: -"HN username. Case-sensitive."New value: +"HN username. Case-sensitive. Trimmed; blank or whitespace-only input is rejected."
  5. Changed3 schema fields changed
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The submissionCount cap that was applied.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Number of submissions returned.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when submissions were capped by submissionCount.",
      +  "type": "boolean"
      +}
  6. Changed1 schema field changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Pagination caveat when submissions were truncated. Absent when all submissions fit within the requested count or includeSubmissions is false.",
      +  "type": "string"
      +}
  7. Changed1 schema field changed
    • addedOutput schema / properties / submissions / items / description
      Added value: +"A single submission by the user (story, comment, job, or poll)."
  8. 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, so the safety profile is covered. The description adds a useful behavioral detail ('optionally ... resolved into full items') but does not discuss pagination behavior, rate limits, or what happens when a username is invalid; pagination is left to the schema.

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 a single front-loaded sentence that moves from the main purpose to the optional enhancement. Every word earns its place; there is no fluff or repetition of schema field definitions.

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?

The description is sufficient for a read-only user-profile tool with a rich input schema and an output schema present. It omits explicit guidance on when to resolve submissions versus when not to, but the schema's parameter descriptions fill that gap adequately.

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 the schema already explains username casing, page size, paging offsets, and includeSubmissions semantics. The description's mention of 'optionally' only faintly echoes the includeSubmissions parameter and adds no new parameter-level meaning.

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?

Description starts with a specific verb and resource: 'Get an HN user profile' and names the exact fields returned (karma, about, optionally resolved submissions). This clearly separates it from sibling tools focused on stories, threads, and content search.

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 phrase 'Get an HN user profile' implies this is the tool for user-profile lookups, but it never states when to prefer it over alternatives or when to enable includeSubmissions. No explicit exclusions or alternative routing are given.

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.