Skip to main content
Glama

Load Cloud Data

horizon_load_cloud_data
Read-onlyIdempotent

Load a player's saved game progress from the cloud when the game starts or the player switches devices. Retrieve save data by userId and session token; if none exists, initialize defaults.

Instructions

Reads a player's save game that was stored with horizon_save_cloud_data. Use when: the game starts or the player switches devices and needs the saved progress. Not for: writing (use horizon_save_cloud_data) or balances of server-owned values (use horizon_get_state). 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: {found, saveData}. found false with saveData null means the player never saved: this is normal on first start, so initialize default data. Errors: 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
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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
foundNo
saveDataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.6.0
    • 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_*"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "found": {
      +      "anyOf": [
      +        {
      +          "description": "false when the player never saved",
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "saveData": {
      +      "anyOf": [
      +        {
      +          "description": "The stored save string, null when found is false",
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  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"
      -]New value: +[
      +  "userId",
      +  "sessionToken"
      +]
  3. First observedv1.5.4

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds layers beyond them: the auth prerequisite (sign in via horizon_signin_email/anonymous, pass accessToken as sessionToken), HORIZON_API_KEY requirement, the normal-case 'found:false/saveData:null' semantics, and error decoding (401 expired session, 403 token-user mismatch, 429 rate limit). This is unusually rich behavioral disclosure that directly shapes correct invocation and retry logic.

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?

Front-loaded purpose followed by labeled sections (Use when / Not for / Requires / Side effects / Returns / Errors). It is dense, but every sentence carries actionable detail — auth, edge cases, error triage — with no 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?

Given the tool is a read with an output schema, the description needn't explain return shape, yet it still documents the found/saveData contract and first-run initialization. Combined with auth, side-effect, and error coverage, nothing an agent needs to call it 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 practical meaning: where userId and sessionToken come from, the sign-in flow that produces the token, and the 403 rule that the userId must match the signed-in user. That goes beyond the schema text, though it doesn't fully specify field formats.

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?

Opens with a specific verb+resource: 'Reads a player's save game that was stored with horizon_save_cloud_data.' It ties the resource to the exact sibling that produces it, and the paired 'Not for' clause names the write counterpart, so an agent can distinguish it 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?

Explicit triggering conditions ('when the game starts or the player switches devices') and explicit exclusions routing to alternatives ('use horizon_save_cloud_data' for writing, 'horizon_get_state' for server-owned balances). Covers both when-to-use and when-not-to-use.

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