Skip to main content
Glama

Submit Score

horizon_submit_score
Idempotent

Submits a player's score to a leaderboard, keeping only the player's best score (higher on DESC, lower on ASC). Use when a round ends on a normal board.

Instructions

Submits a player's score to a leaderboard; the board keeps only each player's best score (higher on DESC boards, lower on ASC boards). Use when: a round ends on a normal board. Then call horizon_get_user_rank to show the new position. Not for: boards marked validatedOnly in horizon_list_leaderboards (use horizon_start_run and horizon_submit_validated) and reading scores (use horizon_get_leaderboard_top). Requires: userId and the player's session: sign in with horizon_signin_email or horizon_signin_anonymous and pass its accessToken as sessionToken. Side effects: replaces the player's entry only when the new score beats it; a worse or equal score, or the same call again, changes nothing. Returns: {success: true} (also when the score did not beat the best one). Errors: 403 VALIDATED_SUBMIT_REQUIRED on a validatedOnly board, nothing written: switch to horizon_start_run and horizon_submit_validated, do not retry. 403 PLAYER_BANNED when a moderator banned the player from the board: final, do not retry. 404 for an unknown leaderboardKey: list valid keys with horizon_list_leaderboards. 401 means the session is missing or expired: sign in again and retry with the new accessToken. 403 for a session means the token belongs to another user: pass the userId that signed in. 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
scoreYesScore to submit, a non-negative integer
userIdYesPlayer user ID (UUID) from horizon_signup_* or horizon_signin_*
sessionTokenYesaccessToken from horizon_signin_email or horizon_signin_anonymous for this userId; sent as a Bearer session
leaderboardKeyNoBoard key from horizon_list_leaderboards (1 to 64 characters: a-z, 0-9, _ and -). Omit to use the API key's default board.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 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 / score / description
      Previous value: -"Score to submit (non-negative integer)"New value: +"Score to submit, a non-negative integer"
    • changedInput schema / properties / sessionToken / description
      Previous value: -"accessToken returned by horizon_signin_email or horizon_signin_anonymous for this user; sent as a Bearer session"New value: +"accessToken from horizon_signin_email or horizon_signin_anonymous for this userId; sent as a Bearer session"
    • 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_*"
  2. Changed3 schema fields changedv1.5.5
    • addedInput schema / properties / sessionToken
      Added value: +{
      +  "description": "accessToken returned by horizon_signin_email or horizon_signin_anonymous for this user; sent as a Bearer session",
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / userId / description
      Previous value: -"User ID (UUID)"New value: +"User ID (UUID) returned by a horizon_signup_* or horizon_signin_* tool"
    • changedInput schema / required
      Previous value: -[
      -  "userId",
      -  "score"
      -]New value: +[
      +  "userId",
      +  "score",
      +  "sessionToken"
      +]
  3. First observedv1.5.4

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the replace-only-if-better semantics, the auth/session flow, the return value, and a full error taxonomy (403 VALIDATED_SUBMIT_REQUIRED, 403 PLAYER_BANNED, 404, 401, 429) with retry guidance. This is exactly the extra context annotations (idempotentHint=true) cannot convey.

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?

Front-loaded with purpose and organized under labeled clauses (Use when / Not for / Requires / Side effects / Returns / Errors), so it scans well. It is on the long side, but nearly every clause carries actionable content 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?

No output schema exists, yet the description supplies the return shape and the full error/retry matrix, plus the session prerequisite. An agent has everything needed to invoke correctly and handle failures without consulting anything else.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds meaning by explaining how sessionToken is obtained (horizon_signin_email/anonymous) and that leaderboardKey can be omitted to use the API key's default board. It doesn't add format detail beyond the schema, but the auth-flow framing is genuinely useful.

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 ('Submits a player's score to a leaderboard') and immediately disambiguates by board type ('higher on DESC boards, lower on ASC boards'). It clearly distinguishes itself from horizon_submit_validated and the read-oriented siblings.

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?

Provides explicit 'Use when', 'Not for', and 'Requires' sections, naming the alternative tools (horizon_start_run + horizon_submit_validated for validated boards, horizon_get_leaderboard_top for reads). The trigger condition (round ends on a normal board) is unambiguous.

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