Skip to main content
Glama

Sync Chat Channel

horizon_sync_chat_channel
Read-onlyIdempotent

Reads an authorized incremental chat channel snapshot to resync missing or unusable realtime content after disconnects, instead of repeated polling.

Instructions

Reads an authorized incremental snapshot for missing/unusable realtime content, resync, HTTP polling or explicit user action. Use when: explicit hosted chat actions after reading horizon://docs/chat. Not for: automatic sends, repeated polling, rich-text rendering or exposing moderation credentials. Use horizon_get_chat_operation to reconcile original sends, then horizon_send_chat_message only for the explicit identical replay. 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: Read-only POST, one HTTP attempt. Complete visible ID order plus unknown immutable text. Known IDs are valid only for the exact cached epoch and complete authorized cache. No periodic polling. Returns: {channel,visibleMessageIds,messages,moderation,serverTime}; hide cache on disconnect/permission change and apply only a complete matching snapshot. Errors: 404 hides private/missing/expired channels or source messages. 409 OPERATION_CONFLICT/OPERATION_EXPIRED or STATE_CONFLICT requires explicit original-intent reconciliation. Never replace an unknown send UUID/time/text. 429 does not schedule a retry. CHAT_MUTED/CHAT_BANNED restrict current chat access. 501 NOT_SUPPORTED means simpleServer has no chat or polling fallback. 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).

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>",
      "channelId": "<channelId>",
      "epoch": "<epoch>",
      "knownMessageIds": "<knownMessageIds>"
    },
    "name": "horizon_sync_chat_channel"
  }
}

Input Schema

NameRequiredDescriptionDefault
epochYesExact cached channel epoch, or null for an initial complete sync
userIdYesActive player matching the current session and project
channelIdYesOriginal canonical lowercase UUID
sessionTokenYesPlayer accessToken sent only as Bearer
knownMessageIdsYesKnown cached message IDs for the exact original epoch; fixed current wire bound20 matches the largest channel window

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 cover read-only, idempotent, open-world, and non-destructive behavior, but the description adds substantial context: read-only POST, one HTTP attempt, no periodic polling, cache epoch validity, required authentication, return shape, and detailed error handling. Nothing contradicts the annotations.

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?

The description is well structured with labeled sections (Use when, Not for, Requires, Side effects, Returns, Errors) and front-loads the purpose. It is long and repeats some details around polling, 401, and 429, so it is not maximally concise.

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 complex five-parameter sync tool with authentication, caching, and reconciliation requirements, the description covers purpose, usage, prerequisites, side effects, return shape, and failure modes. Even without an output schema, the key return structure is described.

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 useful semantics by explaining how to obtain sessionToken and by tying knownMessageIds to the exact cached epoch and complete authorized cache. It does not explain every parameter, but it adds meaning 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?

The first sentence states a specific verb ("Reads") and resource ("authorized incremental snapshot") and scopes it to missing/unusable realtime content, resync, polling, or explicit user action. The "Not for" line and named siblings make it clearly distinguishable from related chat tools.

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?

It gives explicit "Use when" and "Not for" guidance and names alternatives: horizon_get_chat_operation for reconciliation and horizon_send_chat_message for explicit identical replay. It also excludes automatic sends and repeated polling, leaving little 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