Skip to main content
Glama

Link Guest Account to Google

horizon_link_google
Destructive

Converts a signed-in guest player into a Google account while preserving the same user ID, so the current session continues after Google OAuth account linking is chosen.

Instructions

Converts a signed-in guest player into a Google account while keeping the same user ID. Use when: a guest player completes Google OAuth and explicitly chooses to link the account. Not for: new players (use horizon_signup_google), existing google accounts (use horizon_signin_google) and accounts that are not guests. Requires: a signed-in guest player: the userId and current accessToken from horizon_signup_anonymous or horizon_signin_anonymous. Side effects: exchanges the single-use Google code once and turns the guest into a GOOGLE account with the same userId. The current session keeps working and the guest anonymous token is deleted on the server. Returns: 200 with userId, email, googleId, isAnonymous: false, isVerified and authStatus: AUTHENTICATED. Use horizon_signin_google on other devices. Errors: 409 when the Google account already belongs to another account or the account is not a guest: do not retry, ask the player. 401 for an invalid session: sign in again. 400 for invalid input. 404 or 403 for other failures. 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).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "userId": "<userId>",
      "sessionToken": "<sessionToken>",
      "googleAuthorizationCode": "<googleAuthorizationCode>",
      "googleRedirectUri": "<googleRedirectUri>"
    },
    "name": "horizon_link_google"
  }
}

Input Schema

NameRequiredDescriptionDefault
userIdYesPlayer user ID (UUID) from the result of horizon_signup_* or horizon_signin_*
sessionTokenYesPlayer accessToken from signup, signin or refresh-session, passed as sessionToken (max 256 characters)
googleRedirectUriYesExact redirect URI used to obtain the Google authorization code; empty string for configured native flows (max 500 characters)
preferredLanguageNoOptional language code for the account, such as en or de (max 10 characters)
googleAuthorizationCodeYesFresh single-use Google authorization code obtained by the player's OAuth consent flow (max 2000 characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond the annotations (readOnlyHint=false, destructiveHint=true) by describing what actually changes: single-use code exchanged once, guest becomes a GOOGLE account with the same userId, the current session keeps working, and the guest anonymous token is deleted server-side. Error semantics are also disclosed with actionable guidance, including 409 do-not-retry, 401 re-authenticate, and 429 rate-limit handling tied to horizon_test_connection for key validation.

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-load the purpose. The errors sentence is dense and long, but each clause carries operational value 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?

For a destructive, open-world mutation with no output schema, the description covers prerequisites, side effects, the success payload shape, and a full error taxonomy including retry guidance. An agent has everything needed to invoke it correctly and interpret failures.

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 all five parameters are already documented, establishing a baseline of 3. The description adds only modest extra meaning, notably that the Google code is single-use and that userId/sessionToken come specifically from the anonymous signup/signin tools, but says nothing about preferredLanguage or redirect-URI edge cases beyond the schema.

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 precise verb and transformation: converts a signed-in guest player into a Google account while preserving the same user ID. The scope is unambiguous and immediately distinguishable from signup, signin and link_apple/link_email 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?

Explicitly provides 'Use when' (guest completes Google OAuth and chooses to link) and 'Not for' with named alternatives: horizon_signup_google for new players, horizon_signin_google for existing Google accounts, and non-guest accounts. It also names the prerequisite signin sources for the session.

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