Skip to main content
Glama

Get User Rank

horizon_get_user_rank
Read-onlyIdempotent

Retrieve a player's leaderboard position, score and profile after submitting a score. Use it to show 'your rank' in-game, not to list top or nearby entries.

Instructions

Returns one player's own position, score and profile on a leaderboard. Use when: after horizon_submit_score, or to show 'your rank' in the game. Not for: a list of entries (use horizon_get_leaderboard_top or horizon_get_leaderboard_around). Requires: a userId from horizon_signup_* or horizon_signin_*; no session token. Side effects: None (read only). Returns: {position, username, score, profile}. profile is {avatarId, frameId, badges} (IDs from the cosmetics catalog; null or [] when not set, set with horizon_set_profile). Errors: 404 when the player has no score on this board yet (submit one first) or the leaderboardKey is unknown (check horizon_list_leaderboards). Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesPlayer user ID (UUID) from horizon_signup_* or horizon_signin_*
leaderboardKeyNoBoard key from horizon_list_leaderboards (1 to 64 characters: a-z, 0-9, _ and -). Omit to use the API key's default board.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
scoreNo
profileNo
positionNo
usernameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.6.0
    • changedInput schema / properties / leaderboardKey / description
      Previous value: -"Leaderboard key — selects a named board on the API key. Omit to use the default board."New value: +"Board key from horizon_list_leaderboards (1 to 64 characters: a-z, 0-9, _ and -). Omit to use the API key's default board."
    • changedInput schema / properties / userId / description
      Previous value: -"User ID (UUID) returned by a horizon_signup_* or horizon_signin_* tool"New value: +"Player user ID (UUID) from horizon_signup_* or horizon_signin_*"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "position": {
      +      "anyOf": [
      +        {
      +          "description": "1-based position on the board",
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "profile": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "description": "The player's displayed cosmetics",
      +          "properties": {
      +            "avatarId": {
      +              "anyOf": [
      +                {
      +                  "description": "Avatar cosmetic ID, null when not set",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "badges": {
      +              "anyOf": [
      +                {
      +                  "description": "Displayed badge cosmetic IDs (0 to 3)",
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "frameId": {
      +              "anyOf": [
      +                {
      +                  "description": "Frame cosmetic ID, null when not set",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "score": {
      +      "anyOf": [
      +        {
      +          "description": "Best score of the player on this board",
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "username": {
      +      "anyOf": [
      +        {
      +          "description": "Player display name",
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changedv1.5.5
    • changedInput schema / properties / userId / description
      Previous value: -"User ID (UUID)"New value: +"User ID (UUID) returned by a horizon_signup_* or horizon_signin_* tool"
  3. First observedv1.5.4

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description goes beyond them by disclosing required auth (HORIZON_API_KEY), the 404 semantics (no score yet / unknown board) with remedies, and 401/429 failure handling including rate-limit advice. This is substantial behavioral context an agent cannot get from the annotations.

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?

Labeled sections (Use when / Not for / Requires / Side effects / Returns / Errors) make it scannable and front-loaded with the core purpose first. The Errors sentence is dense and long, but each clause is actionable rather than filler.

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?

Although an output schema exists, the description still summarizes the return shape and profile sub-fields, and it covers auth, error taxonomy, and rate limits. Nothing an agent needs to select or invoke this tool correctly 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%, so both userId and leaderboardKey are fully documented in the schema (origin, format, default-board behavior). The description largely restates those origins rather than adding new syntax or value constraints, so the baseline 3 is correct.

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+resource ('Returns one player's own position, score and profile on a leaderboard') and immediately distinguishes itself from the sibling list tools by scope (single player's own rank vs. a list of entries). An agent can differentiate it from horizon_get_leaderboard_top/around without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit 'Use when' triggers (after horizon_submit_score, to show 'your rank') and an explicit 'Not for' with named alternatives (horizon_get_leaderboard_top, horizon_get_leaderboard_around). Preconditions are also spelled out (needs a userId, no session token).

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