Skip to main content
Glama

Decline Received Item Gift

horizon_decline_item_gift
DestructiveIdempotent

Declines a received item gift offer at its original revision, returning the item to the sender and preparing a protected return entry. Use for explicit private gift actions with a signed-in session.

Instructions

Declines one received offer under its original gift revision so the item returns to the sender. Use when: explicit private item gift actions after reading horizon://docs/item-gifts. Claim offers and returns with horizon_claim_inbox. Not for: automatic gifting, polling or generated replacement operations. Use horizon_get_item_gift_operation to reconcile the original intent. 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: One HTTP attempt. Removes the Inbox offer and prepares a protected return entry for the sender, who claims it with horizon_claim_inbox. The sender fee stays charged. Replay of the same decline never returns twice. Returns: {gift,replayed,returnDelivery,serverTime} Errors: 409 REVISION_CONFLICT, OPERATION_CONFLICT, OPERATION_EXPIRED, STATE_CONFLICT and GIFT_EXPIRED, GIFT_DECLINED, GIFT_ALREADY_CLAIMED, GIFT_UNAVAILABLE need explicit reconciliation, never fresh revisions or operation IDs on an unknown outcome. Missing OPERATION_NOT_FOUND does not prove nonexecution. RECIPIENT_INBOX_FULL and 422 SELF_GIFT, ITEM_EQUIPPED, OPEN_GIFT_LIMIT_REACHED, GIFT_LIMIT_REACHED, INSUFFICIENT_BALANCE withdraw and charge nothing. 403 ITEM_GIFTS_DISABLED. 404 RECIPIENT_NOT_FOUND hides blocks. 429 ITEM_GIFTS_RATE_LIMITED schedules no retry. 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>",
      "giftId": "<giftId>",
      "expectedGiftRevision": "<expectedGiftRevision>"
    },
    "name": "horizon_decline_item_gift"
  }
}

Input Schema

NameRequiredDescriptionDefault
giftIdYesGift ID from the Inbox attachment itemGift or the gift state
userIdYesActive player matching the current session and project
sessionTokenYesCurrent accessToken sent only as Bearer
expectedGiftRevisionYesExact original safe-integer revision; never refresh-and-retry a mutation

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 destructive=true, idempotent=true, openWorld=true and readOnly=false, so the safety profile is largely covered. The description still adds real value beyond them: one HTTP attempt, inbox offer removal, a protected return entry the sender claims, the sender fee staying charged, and replay never returning twice. However, the error block is a dense laundry list that mixes actionable guidance (401 re-auth, 429 no retry) with low-value platform boilerplate (HORIZON_API_KEY, horizon_test_connection), diluting the behavioral signal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and routing guidance are front-loaded and the labeled sections make it scannable, but the error enumeration is a very long run-on paragraph of codes and platform notes, and the HORIZON_API_KEY / horizon_test_connection aside is tangential to invoking this tool. Roughly a third of the text could be trimmed without losing decision-relevant information.

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 4-required-parameter destructive mutation with no output schema, the definition covers auth acquisition, side effects, the idempotency guarantee, the return shape, and a per-status error contract, including which failures withdraw and charge nothing. Nothing an agent needs to call this correctly or interpret a failure is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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; the description earns above that by tying expectedGiftRevision to concrete failure modes (409 REVISION_CONFLICT, OPERATION_EXPIRED) and forbidding fresh revisions or operation IDs on unknown outcomes, which explains why the revision must be exact. It also states that sessionToken is the accessToken from a sign-in tool and that 403 means the token belongs to another user, adding meaning beyond the schema text.

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 ('Declines one received offer under its original gift revision so the item returns to the sender'), including the recipient-side scope and the revision precondition. That distinguishes it from horizon_claim_inbox and horizon_get_item_gift_operation without needing their schemas.

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?

Explicitly separates 'Use when' from 'Not for' and names the alternative for each case: claim offers/returns with horizon_claim_inbox, reconcile original intent with horizon_get_item_gift_operation, and excludes automatic gifting, polling, and generated replacement operations. Prerequisites (sign-in tool, docs resource to read first) are spelled out.

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