Skip to main content
Glama

Upload Validated Run Evidence

horizon_upload_evidence

Uploads a run's raw input log for developer evidence review when a validated submit requires it, before the 24-hour upload window closes.

Instructions

Uploads the input log of a validated run after horizon_submit_validated answered with evidence.required = true (evidence review). Use when: only when a submit result carries evidence.required: true, before evidence.uploadBefore (24 hours). Not for: runs without an evidence request (the server answers 404 EVIDENCE_NOT_REQUESTED) and sending the log with the submit (the submit takes only its hash). Requires: userId and the player's session: sign in with horizon_signin_email or horizon_signin_anonymous and pass its accessToken as sessionToken. The runId from the submit result and the raw input log as exactly one of inputLogBase64 (raw bytes as base64) or inputLog (UTF-8 text). Its SHA-256 must equal the inputLogHash sent with the run, so pass the same bytes or text that were hashed at submit; at most evidence.maxBytes (32,768 bytes by default). Side effects: stores the log for the developer's review; one upload per run (a second one gets 409). Returns: {runId, status: "UPLOADED", bytes} plus inputLogHash (the SHA-256 of the uploaded bytes, for comparison with the submit). Errors: Errors carry a stable code in the body and the error result names it: 400 EVIDENCE_INVALID_ENCODING (not standard base64), 401 SESSION_REQUIRED, 403 SESSION_FORBIDDEN, 404 EVIDENCE_NOT_REQUESTED (no request for this run and player; also for a run of another player), 409 EVIDENCE_ALREADY_UPLOADED, 410 EVIDENCE_EXPIRED (window passed, slot freed), 413 EVIDENCE_TOO_LARGE (decoded log above maxBytes), 422 EVIDENCE_HASH_MISMATCH (SHA-256 of the log differs from the run's inputLogHash; the request stays open, retry with the correct bytes until uploadBefore), 429 without code (account request limit). Only 422 and network errors are worth a retry; the others are final. Local error (no request sent): INVALID_INPUT_LOG when the log input was missing, doubled, empty or not base64. 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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesrunId (UUID) from the horizon_submit_validated result (evidence.runId)
userIdYesPlayer user ID (UUID) from horizon_signup_* or horizon_signin_*
inputLogNoInput log as UTF-8 text; its UTF-8 bytes are uploaded. Use this or inputLogBase64.
sessionTokenYesaccessToken from horizon_signin_email or horizon_signin_anonymous for this userId; sent as a Bearer session
inputLogBase64NoRaw input log bytes as standard base64. Use this or inputLog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false); the description goes well beyond them, disclosing auth prerequisites (signin + accessToken as sessionToken, HORIZON_API_KEY), the one-upload-per-run limit (409), size cap (maxBytes 32,768), rate limiting (429), and a full enumerated error table with retry-worthiness classification. That is exactly the behavioral context annotations cannot carry.

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?

Front-loaded and organized with clear Use when / Not for / Requires / Side effects / Returns / Errors sections, so the agent can scan to what it needs. It is dense and the closing paragraph restates the 401 and 429 semantics already implied above, which is minor redundancy rather than bloat.

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?

There is no output schema, so the description supplies the return shape ({runId, status, bytes, inputLogHash}) and its comparison purpose. Combined with prerequisites, limits, side effects, and error handling, an agent has everything needed to invoke this correctly.

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 real semantics: the mutual exclusivity of inputLog/inputLogBase64, the requirement that the uploaded bytes' SHA-256 equal the submit's inputLogHash, where each token originates, and a 32,768-byte effective cap that differs from the schema's maxLength. It does not need to do more since the schema documents each field.

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 specific verb and resource ('Uploads the input log of a validated run') and ties it directly to the producing sibling (horizon_submit_validated with evidence.required = true). An agent can distinguish it from submit tools and from unrelated uploads 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' (only after a submit result carries evidence.required: true, before evidence.uploadBefore/24h) and 'Not for' clauses that name the failure the server returns (404 EVIDENCE_NOT_REQUESTED) and the alternative pattern (passing the log with the submit, which only takes a hash). Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.