Skip to main content
Glama

Get Player Statistics

horizon_get_statistics
Read-onlyIdempotent

Reads a player's statistics snapshot and server operation window to restore sessions, recover reconnects, or verify an uncertain batch before retrying an update.

Instructions

Reads a player's statistics snapshot and server operation window. Use when: explicit loading, reconnect recovery or checking an uncertain batch before retrying its original ID. Not for: writing counters; use horizon_update_statistics with the original durable ID. 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: None (read only). Returns: {userId, definitionVersion, definitions, revision, values, operationWindow, operationId?, replayed?, newlyUnlocked}. definitions null means unchanged since definitionVersion; keep the cached definitions. Errors: 401 SESSION_REQUIRED: sign in again; 403 SESSION_FORBIDDEN: use the matching player. 409 OPERATION_CONFLICT means the ID was already used for a different payload. 410 OPERATION_EXPIRED rejects an expired/evicted unknown ID. Never replace an uncertain ID automatically. 422 UNKNOWN_STATISTIC/UPDATE_ABOVE_LIMIT/VALUE_OVERFLOW rejects the whole batch. 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

NameRequiredDescriptionDefault
userIdYesSigned-in player UUID matching the supplied session token
sessionTokenYesPlayer accessToken from horizon_signin_anonymous or horizon_signin_email; sent as Bearer
definitionVersionNoLast cached definitionVersion; omit to load the full catalog

Output Schema

NameRequiredDescriptionDefault
userIdYes
valuesYes
replayedNo
revisionYes
definitionsYes
operationIdNo
newlyUnlockedYes
operationWindowYes
definitionVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.9.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive, yet the description goes further: it states how to obtain the sessionToken, documents the replayed?/operationId semantics, and enumerates error codes (401/403/409/410/422/429) with remediation. It also warns against auto-retrying an uncertain operation ID, which is guidance no annotation or schema field carries.

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 statement of purpose followed by clearly labeled Use when / Not for / Requires / Side effects / Returns / Errors sections, so an agent can scan to the needed part. The errors section is dense and slightly over-long for a read call, which keeps it from a 5.

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?

Even though an output schema exists, the description explains the non-obvious return fields (replayed?, newlyUnlocked, definitions caching) and covers auth, rate limits, and failure modes. Nothing an agent needs to invoke or interpret this call correctly is missing.

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, but the description adds value the schema lacks: it ties definitionVersion to response behavior ('definitions null means unchanged since definitionVersion; keep the cached definitions') and explains where sessionToken comes from. That causal explanation of the version parameter exceeds schema prose.

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?

Names a specific verb and resource ('Reads a player's statistics snapshot and server operation window') and explicitly contrasts with the write sibling horizon_update_statistics. An agent can distinguish this from the mutation path without opening either 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?

'Use when: explicit loading, reconnect recovery or checking an uncertain batch before retrying its original ID' gives concrete triggering conditions, and 'Not for: writing counters; use horizon_update_statistics' names the alternative and the condition that selects it. Both when-to-use and when-not-to-use are present.

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

Deploy Server

Other Tools