Skip to main content
Glama

Create Log

horizon_create_log

Writes a server-side INFO, WARN, or ERROR log entry for a player, making technical events and handled errors visible in the dashboard's user logs for debugging.

Instructions

Writes one server-side log entry (INFO, WARN or ERROR) for a player, visible in the horizOn dashboard's user logs. Use when: the game records a technical event or a handled error for later debugging, for example a failed purchase or a slow load. Not for: crashes and exceptions with a stack trace (use horizon_create_crash_report) or messages written by players (use horizon_submit_feedback). Requires: a userId from horizon_signup_* or horizon_signin_* and a positive userLogs quota for the hosted tier (horizon://api/feature-limits); no session token. Side effects: creates one log entry per call; a repeat creates a duplicate. Returns: {id, createdAt} of the new entry. Errors: 403 when logging is disabled by quota or the player belongs to another project. 400 for an invalid userId: pass the ID from the sign-in result. 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>",
      "message": "<message>",
      "type": "<type>"
    },
    "name": "horizon_create_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesLog level: INFO, WARN or ERROR
userIdYesPlayer user ID (UUID) from horizon_signup_* or horizon_signin_*
messageYesLog message (max 1000 characters)
errorCodeNoOptional code to group entries in the dashboard, useful with ERROR, for example 'IAP_TIMEOUT' (max 50 characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.6.0
    • changedInput schema / properties / errorCode / description
      Previous value: -"Error code (max 50 characters)"New value: +"Optional code to group entries in the dashboard, useful with ERROR, for example 'IAP_TIMEOUT' (max 50 characters)"
    • changedInput schema / properties / type / description
      Previous value: -"Log level: INFO, WARN, or ERROR"New value: +"Log level: INFO, WARN or ERROR"
    • 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_*"
  2. Changed1 schema field changedv1.5.5
    • changedInput schema / properties / userId / description
      Previous value: -"User ID (UUID)"New value: +"User ID (UUID) returned by a horizon_signup_* or horizon_signin_* tool"
  3. First observedv1.5.4

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false and openWorldHint=true, and the description adds real value beyond them: one entry per call with duplicates on repeat, quota gating, API-key auth, and the full error taxonomy (403 quota/project mismatch, 400 bad userId, 401 wrong key, 429 rate limit). It stops short of saying what the dashboard display or retention looks like, so it is strong but not exhaustive.

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, front-loaded sections (Use when / Not for / Requires / Side effects / Returns / Errors) make it scannable despite its length. It is somewhat overlong: the error paragraph repeats the 401 explanation across two clauses and could be tightened without losing guidance.

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 mutating write tool with no output schema, the description covers everything needed: return shape {id, createdAt}, duplicate-on-retry behavior, auth requirements, quota precondition, and per-status error handling including the specific advice to wait and retry on 429.

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 four parameters including the enum and the errorCode grouping hint are already documented. The description adds only the provenance of userId ('from horizon_signup_* or horizon_signin_*') and a validation note, which largely restates the schema — baseline 3 is appropriate.

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 opening states a specific verb and resource: 'Writes one server-side log entry (INFO, WARN or ERROR) for a player'. It immediately names the sibling it is not (horizon_create_crash_report for stack traces, horizon_submit_feedback for player messages), 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 'Use when' with two concrete examples (failed purchase, slow load) and an explicit 'Not for' that routes to two named alternatives. It also states prerequisites (userId source, quota, no session token), which removes ambiguity about when this tool is callable at all.

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