Skip to main content
Glama

Sign In with Apple

horizon_signin_apple

Signs an existing Apple player in by validating the identity token from the app’s consent flow and creating a player session; does not create accounts.

Instructions

Signs an existing Apple player in using the identity token obtained by the app's Apple consent flow. Use when: the player requests Apple signin with a token whose audience matches this project's Apple configuration. Not for: driving provider UI, dashboard-account signin, or automatically signing up after any error. Only USER_NOT_FOUND permits the explicit horizon_signup_apple flow. Side effects: validates the identity token and creates a player session; it does not create an account or retry. Returns: user details, appleUserId, isPrivateRelayEmail, authStatus: AUTHENTICATED and accessToken. includeRefreshToken=true adds refreshToken and both expiry timestamps. Errors: 404 USER_NOT_FOUND permits signup with the still-valid identity JWT and first-consent name fields. 400 INVALID_APPLE_TOKEN or APPLE_NOT_CONFIGURED requires correction, not signup. 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": {
      "appleIdentityToken": "<appleIdentityToken>"
    },
    "name": "horizon_signin_apple"
  }
}

Input Schema

NameRequiredDescriptionDefault
appleIdentityTokenYesApple identity-token JWT obtained after player consent, with audience matching this project's configured Services ID or Bundle ID
includeRefreshTokenNoExplicit opt-in to a rotating 30-day refresh session; omitted or false preserves access-only behavior. Store refresh tokens in platform secure storage

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.1

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false, so the safety profile is structured. The description adds genuinely non-redundant behavior: it creates a session but no account, does not retry, requires HORIZON_API_KEY, and enumerates failure semantics including 429 per-minute rate limiting and how a 401 correlates with horizon_test_connection. What it does not cover is session lifetime/reuse implications for a non-idempotent call, which is the one behavioral gap.

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?

Purpose is front-loaded and the remaining content is segmented by labels (Use when / Not for / Side effects / Returns / Errors) that make scanning easy. The final sentence is dense, packing 401, 429, and API-key diagnosis into one run-on block, which costs a little clarity.

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?

With no output schema, the description carries return values itself (user details, appleUserId, isPrivateRelayEmail, authStatus, accessToken, conditional refreshToken and expiries) and enumerates the error codes an agent must branch on. Everything needed to invoke it and handle failure correctly is present.

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 earns above baseline by explaining the observable effect of includeRefreshToken=true (adds refreshToken and both expiry timestamps) rather than restating the schema's field description. The appleIdentityToken parameter is only referenced obliquely via audience matching, which the schema already states.

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?

First sentence states a specific verb and resource — signing in an existing Apple player with the identity token from the app's consent flow — and narrows the scope to 'existing' players, which immediately separates it from signup. Sibling differentiation is explicit: 'Only USER_NOT_FOUND permits the explicit horizon_signup_apple flow.'

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 requests Apple signin with a token whose audience matches this project's Apple configuration) and an explicit 'Not for' list covering provider UI, dashboard-account signin, and auto-signup after errors. It names the alternative (horizon_signup_apple) and the single error code that unlocks it, leaving nothing to inference.

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