Skip to main content
Glama

Sign Up with Google

horizon_signup_google

Creates a Google player from a fresh OAuth authorization code, or signs in an existing Google identity when explicitly enabled. Use after Google OAuth consent for signup or one-click signin.

Instructions

Creates a Google player, or signs an existing Google player in when signInIfExists is explicitly enabled. Use when: the player completes Google OAuth and explicitly chooses registration or one-click signup/signin. Not for: probing horizon_signin_google then reusing its authorization code for signup. Google codes are single-use; obtain a fresh code after any uncertain exchange. Requires: a fresh Google authorization code and its exact redirect URI from the app's OAuth flow, plus the server's configured Google OAuth client. Side effects: exchanges the code once. signInIfExists omitted/false keeps strict signup semantics; true authenticates an existing Google identity. It does not link a different email/provider account. Returns: 201 user details and accessToken for new users or signInIfExists=true existing users, even without refresh opt-in. includeRefreshToken=true adds refreshToken and both expiry timestamps. The server derives the name from the Google email; use horizon_change_name later. Errors: 409 on an existing identity in strict signup mode or conflicting email. 400 for invalid provider data. Never automatically retry an uncertain exchange or reuse a spent code. 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": {
      "googleAuthorizationCode": "<googleAuthorizationCode>",
      "googleRedirectUri": "<googleRedirectUri>"
    },
    "name": "horizon_signup_google"
  }
}

Input Schema

NameRequiredDescriptionDefault
signInIfExistsNoExplicitly enable one-click Google registration/signin with one code exchange; omitted/false remains signup-only
googleRedirectUriYesExact redirect URI used to obtain the Google authorization code; empty string for configured native flows (max 500 characters)
includeRefreshTokenNoExplicit opt-in to a rotating 30-day refresh session; omitted or false preserves access-only behavior. Store refresh tokens in platform secure storage
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.11.1

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: it discloses the single-use code exchange, what signInIfExists does and does not do (no account linking across email/provider), the HORIZON_API_KEY requirement, specific error codes (409, 400, 401, 429) with diagnosis guidance, and rate-limit remedy. The no-retry instruction is consistent with idempotentHint=false and destructiveHint=false, so there is no contradiction with structured fields.

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 routing decision before the mechanics. It is long, with minor redundancy between "obtain a fresh code after any uncertain exchange" and the later "Never automatically retry... or reuse a spent code," which is why it is not 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?

For a non-idempotent, open-world OAuth exchange with no output schema, the description covers prerequisites, side effects, return payload (201 with user details and accessToken, conditional refreshToken), and failure modes with status codes. Nothing an agent needs to invoke it safely 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 description coverage is 100%, so the baseline is 3; the description adds value by spelling out that omitted/false signInIfExists yields 409 on an existing identity while true authenticates it, and that the name is derived from the Google email with horizon_change_name needed afterward. It still repeats some schema-level detail (redirect URI exactness, refresh token opt-in) rather than adding new semantics for those two parameters.

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 and resource ("Creates a Google player, or signs an existing Google player in") and immediately names the sibling it must not be confused with: "Not for: probing horizon_signin_google then reusing its authorization code for signup." An agent can distinguish this from horizon_signin_google and the other signup variants (apple/email/anonymous) 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?

Provides an explicit "Use when" condition (player completes Google OAuth and explicitly chooses registration or one-click auth) and an explicit "Not for" anti-pattern with the alternative named (horizon_signin_google, plus its single-use-code hazard). The signInIfExists semantics further routes between strict signup and signin behavior.

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