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

NameRequiredDescriptionDefault
usernameYesHN username. Case-sensitive. Trimmed; blank or whitespace-only input is rejected.
submissionCountNoPage size — how many submissions to resolve per call, at most 50 per call. A larger value is served at 50, and the notice names the submissionOffset for the next page. 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 advance by the page size served, 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

NameRequiredDescriptionDefault
capNoThe submissionCount value served: as passed, or 50 when submissionCount was above that cap.
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 — noting when submissionCount was served at its per-call cap or the call's 50-second time budget cut the failed fetches, and closing with the submissions whose text was cut to keep the page within the 64,000-byte response budget. Absent when the page reaches the end of the history with no failed IDs and no cut text, or when no submissions were resolved.
failedIdsNoSubmission IDs in this window whose fetch failed after retries or ran past the call's 50-second time budget. 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. Changed4 schema fields changed
    • changedOutput schema / properties / failedIds / description
      Previous value: -"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."New value: +"Submission IDs in this window whose fetch failed after retries or ran past the call's 50-second time budget. 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."
    • changedOutput schema / properties / notice / description
      Previous 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 — noting when submissionCount was served at its per-call cap. Absent when the page reaches the end of the history with no failed IDs, 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 — noting when submissionCount was served at its per-call cap or the call's 50-second time budget cut the failed fetches, and closing with the submissions whose text was cut to keep the page within the 64,000-byte response budget. Absent when the page reaches the end of the history with no failed IDs and no cut text, or when no submissions were resolved."
    • changedOutput schema / properties / submissions / items / properties / text / description
      Previous value: -"Body text (HTML stripped)."New value: +"Body text (HTML stripped). Cut short when the page would otherwise exceed the 64,000-byte response budget, with textTruncated set."
    • addedOutput schema / properties / submissions / items / properties / textTruncated
      Added value: +{
      +  "description": "True when text is a prefix of the body, cut short to keep the page within the 64,000-byte response budget — hn_get_thread with this id returns it whole. Absent when text is whole.",
      +  "type": "boolean"
      +}
  2. Changed6 schema fields changed
    • changedInput schema / properties / submissionCount / description
      Previous value: -"Page size — how many submissions to resolve per call. Only used when includeSubmissions is true."New value: +"Page size — how many submissions to resolve per call, at most 50 per call. A larger value is served at 50, and the notice names the submissionOffset for the next page. Only used when includeSubmissions is true."
    • changedInput schema / properties / submissionCount / maximum
      Previous value: -50New value: +1000
    • changedInput schema / properties / submissionOffset / description
      Previous value: -"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."New value: +"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 advance by the page size served, and so on. The enrichment block echoes submissionOffset and, when more remain, the offset to send next. Only used when includeSubmissions is true."
    • changedOutput schema / properties / cap / description
      Previous value: -"The submissionCount cap that was applied."New value: +"The submissionCount value served: as passed, or 50 when submissionCount was above that cap."
    • changedOutput schema / properties / notice / description
      Previous 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."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 — noting when submissionCount was served at its per-call cap. Absent when the page reaches the end of the history with no failed IDs, or when no submissions were resolved."
    • changedOutput schema / properties / submissions / items / properties / descendants / description
      Previous value: -"Comment count (stories/polls)."New value: +"HN's count of live comments in the thread (descendants); dead and deleted comments are not counted. Present for stories and polls."
  3. 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)."
  4. 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"
      -]
  5. 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."
  6. 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."
  7. 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"
      +}
  8. 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"
      +}
  9. Changed1 schema field changed
    • addedOutput schema / properties / submissions / items / description
      Added value: +"A single submission by the user (story, comment, job, or poll)."
  10. First observed

TDQS

A3.6/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read. The description adds the shape of the result (karma, about) and the optional resolution of submissions, but the resolution behavior is already spelled out in the includeSubmissions schema text, so little is added beyond structured fields.

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?

A single front-loaded sentence with zero filler; the core purpose and the optional submission enrichment appear immediately.

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?

With a fully described schema, an output schema, and a read-only annotation, the description only needs to state purpose and scope, which it does. A note on unknown-user behavior or paging expectations would make it fully self-sufficient.

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 coverage is 100% and the parameter descriptions already cover case sensitivity, the 50-per-call cap, paging via submissionOffset, and the includeSubmissions gate. The description adds no parameter meaning beyond that, so the baseline 3 applies.

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?

States a specific verb and resource ('Get an HN user profile') plus the returned fields (karma, about) and an optional enrichment. The sibling tools (get_stories, get_thread, search_content) cover clearly different resources, so confusion is unlikely, but the description never explicitly differentiates itself the way a 5 would.

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?

Usage is only implied: the tool is for looking up a user, and 'optionally their most recent submissions' hints at when to set includeSubmissions. There is no stated when-not, no mention of what happens for unknown users, and no routing advice relative to hn_search_content or the other siblings.

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.