Skip to main content
Glama

stackexchange-mcp-server

Get Stack Exchange User Profile

stackexchange_get_user
Read-onlyIdempotent

Fetch a Stack Exchange user profile by numeric user ID: reputation, badge counts, answer and question counts, account and last-access dates, and top tags by answer score. Useful for credibility context on an answer author — pass the authorUserId from any question or answer in stackexchange_get_thread output. Returns profile fields plus up to 10 top tags by answer score.

Input Schema

NameRequiredDescriptionDefault
siteNoStack Exchange site the user ID belongs to — the api_site_parameter (e.g. "stackoverflow", "superuser") or the site's domain (e.g. "superuser.com"). User IDs are per-site, so pass the site of the thread the authorUserId came from. Defaults to "stackoverflow". Call stackexchange_list_sites to discover valid values.stackoverflow
userIdYesNumeric user ID (at most 2147483647) — use the authorUserId field from a question or answer in stackexchange_get_thread output.

Output Schema

NameRequiredDescriptionDefault
linkNoDirect URL to the user profile.
errorNoPresent when the call failed. Absent on success.
userIdNoNumeric user ID on this Stack Exchange site.
topTagsNoTop tags by answer score (up to 10). Empty array for new users with no answers.
locationNoUser-provided location string when available.
quotaMaxNoMaximum API quota calls per day (300 keyless, ~10,000 with API key).
reputationNoUser reputation score.
websiteUrlNoUser-provided website URL when available.
answerCountNoTotal number of answers posted when provided by the API.
badgeCountsNoBadge counts when provided by the API.
displayNameNoDisplay name shown on the site.
creationDateNoISO 8601 timestamp of when the account was created — the account age.
questionCountNoTotal number of questions posted when provided by the API.
lastAccessDateNoISO 8601 timestamp of the last time the user accessed the site — a stale value means the author is unlikely to respond.
quotaRemainingNoRemaining API quota calls for the current day.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / site / description
      Previous value: -"Stack Exchange site — use the api_site_parameter value (e.g. \"stackoverflow\", \"superuser\"). Defaults to \"stackoverflow\". Call stackexchange_list_sites to discover valid values."New value: +"Stack Exchange site the user ID belongs to — the api_site_parameter (e.g. \"stackoverflow\", \"superuser\") or the site's domain (e.g. \"superuser.com\"). User IDs are per-site, so pass the site of the thread the authorUserId came from. Defaults to \"stackoverflow\". Call stackexchange_list_sites to discover valid values."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `user_not_found`: The user lookup returns an empty result set — SE returns HTTP 200 with no items for unknown user IDs rather than 404. `invalid_user_id`: userId is above 2147483647 — Stack Exchange user IDs are 32-bit signed integers. `invalid_site`: The provided site value is not a valid Stack Exchange network site identifier. `invalid_parameter`: Stack Exchange rejected a request parameter and named the field rather than reporting a bad site. `quota_exceeded`: The Stack Exchange API quota_remaining has reached 0. `invalid_api_key`: Stack Exchange does not recognize the API key this server is configured with. `upstream_unavailable`: Stack Exchange answered with a body that is not the expected JSON envelope. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `user_not_found`: The user lookup returns an empty result set — SE returns HTTP 200 with no items for unknown user IDs rather than 404. `invalid_user_id`: userId is above 2147483647 — Stack Exchange user IDs are 32-bit signed integers. `invalid_site`: The provided site value is not a valid Stack Exchange network site identifier. `invalid_parameter`: Stack Exchange rejected a request parameter and named the field rather than reporting a bad site. `quota_exceeded`: The Stack Exchange API quota_remaining has reached 0. `throttled`: Stack Exchange is throttling this server's IP address, or its backoff window outlasts what the call can wait. `pacer_shed`: The call would wait in this server's queue to Stack Exchange longer than its time budget allows. `invalid_api_key`: Stack Exchange does not recognize the API key this server is configured with. `upstream_unavailable`: Stack Exchange reported itself temporarily unavailable or failing internally, or answered with a body that is not the expected JSON envelope. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "user_not_found",
      -  "invalid_user_id",
      -  "invalid_site",
      -  "invalid_parameter",
      -  "quota_exceeded",
      -  "invalid_api_key",
      -  "upstream_unavailable"
      -]New value: +[
      +  "user_not_found",
      +  "invalid_user_id",
      +  "invalid_site",
      +  "invalid_parameter",
      +  "quota_exceeded",
      +  "throttled",
      +  "pacer_shed",
      +  "invalid_api_key",
      +  "upstream_unavailable"
      +]
  2. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `user_not_found`: The user lookup returns an empty result set — SE returns HTTP 200 with no items for unknown user IDs rather than 404. `invalid_user_id`: userId is above 2147483647 — Stack Exchange user IDs are 32-bit signed integers. `invalid_site`: The provided site value is not a valid Stack Exchange network site identifier. `invalid_parameter`: Stack Exchange rejected a request parameter and named the field rather than reporting a bad site. `quota_exceeded`: The Stack Exchange API quota_remaining has reached 0. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `user_not_found`: The user lookup returns an empty result set — SE returns HTTP 200 with no items for unknown user IDs rather than 404. `invalid_user_id`: userId is above 2147483647 — Stack Exchange user IDs are 32-bit signed integers. `invalid_site`: The provided site value is not a valid Stack Exchange network site identifier. `invalid_parameter`: Stack Exchange rejected a request parameter and named the field rather than reporting a bad site. `quota_exceeded`: The Stack Exchange API quota_remaining has reached 0. `invalid_api_key`: Stack Exchange does not recognize the API key this server is configured with. `upstream_unavailable`: Stack Exchange answered with a body that is not the expected JSON envelope. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "user_not_found",
      -  "invalid_user_id",
      -  "invalid_site",
      -  "invalid_parameter",
      -  "quota_exceeded"
      -]New value: +[
      +  "user_not_found",
      +  "invalid_user_id",
      +  "invalid_site",
      +  "invalid_parameter",
      +  "quota_exceeded",
      +  "invalid_api_key",
      +  "upstream_unavailable"
      +]
  3. Changed5 schema fields changed
    • changedInput schema / properties / userId / description
      Previous value: -"Numeric user ID — use the authorUserId field from a question or answer in stackexchange_get_thread output."New value: +"Numeric user ID (at most 2147483647) — use the authorUserId field from a question or answer in stackexchange_get_thread output."
    • addedOutput schema / properties / creationDate
      Added value: +{
      +  "description": "ISO 8601 timestamp of when the account was created — the account age.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `user_not_found`: The user lookup returns an empty result set — SE returns HTTP 200 with no items for unknown user IDs rather than 404. `invalid_site`: The provided site value is not a valid Stack Exchange network site identifier. `quota_exceeded`: The Stack Exchange API quota_remaining has reached 0. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `user_not_found`: The user lookup returns an empty result set — SE returns HTTP 200 with no items for unknown user IDs rather than 404. `invalid_user_id`: userId is above 2147483647 — Stack Exchange user IDs are 32-bit signed integers. `invalid_site`: The provided site value is not a valid Stack Exchange network site identifier. `invalid_parameter`: Stack Exchange rejected a request parameter and named the field rather than reporting a bad site. `quota_exceeded`: The Stack Exchange API quota_remaining has reached 0. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "user_not_found",
      -  "invalid_site",
      -  "quota_exceeded"
      -]New value: +[
      +  "user_not_found",
      +  "invalid_user_id",
      +  "invalid_site",
      +  "invalid_parameter",
      +  "quota_exceeded"
      +]
    • addedOutput schema / properties / lastAccessDate
      Added value: +{
      +  "description": "ISO 8601 timestamp of the last time the user accessed the site — a stale value means the author is unlikely to respond.",
      +  "type": "string"
      +}
  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": [
      +      "userId",
      +      "displayName",
      +      "link",
      +      "reputation",
      +      "topTags",
      +      "quotaRemaining",
      +      "quotaMax"
      +    ]
      +  },
      +  {
      +    "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`: The user lookup returns an empty result set — SE returns HTTP 200 with no items for unknown user IDs rather than 404. `invalid_site`: The provided site value is not a valid Stack Exchange network site identifier. `quota_exceeded`: The Stack Exchange API quota_remaining has reached 0. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "user_not_found",
      +            "invalid_site",
      +            "quota_exceeded"
      +          ],
      +          "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: -[
      -  "userId",
      -  "displayName",
      -  "link",
      -  "reputation",
      -  "topTags",
      -  "quotaRemaining",
      -  "quotaMax"
      -]
  5. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and openWorld, so the safety profile is covered. The description adds a real constraint not obvious elsewhere: results include up to 10 top tags by answer score. It stays silent on API quota/auth behavior for the Stack Exchange API, which would have been a useful addition for a network-backed tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the verb and returned fields, then the use case. Slight waste: 'top tags by answer score' appears both in the field enumeration and again in the final sentence, making the closing line partially redundant.

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 an output schema, full parameter descriptions, and safety annotations, the description covers what an agent needs to select and call this tool. The only missing piece is any note on Stack Exchange API rate limits or failure modes when a user ID is invalid for the given site.

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 schema already documents the site parameter (per-site user IDs, api_site_parameter vs domain, list_sites for discovery) and the userId parameter including the authorUserId provenance hint. The description restates that provenance rather than adding new meaning, so the baseline 3 is appropriate.

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?

States a specific verb and resource ('Fetch a Stack Exchange user profile by numeric user ID') and enumerates the returned fields (reputation, badges, answer/question counts, dates, top tags). This clearly distinguishes it from siblings like stackexchange_get_thread or stackexchange_search_questions, which deal with threads and search rather than a single author's profile.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete use case ('credibility context on an answer author') and an explicit workflow: pass the authorUserId from a question or answer in stackexchange_get_thread output. It does not state when NOT to use it or name an alternative profile-lookup path, but the routing signal is strong and actionable.

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.