Skip to main content
Glama

Accept Friend Request

horizon_accept_friend_request
DestructiveIdempotent

Accept a pending friend request using the exact reviewed revision and request ID, creating the friendship on both sides and returning an updated social snapshot.

Instructions

Accepts Friend Request using the reviewed player revision. Use when: the player explicitly requests this social action. Not for: automatic retries after timeout, automatic acceptance of crossed requests or changing expectedRevision without reconciling intent. Requires: userId and the player's session: sign in with horizon_signin_email or horizon_signin_anonymous and pass its accessToken as sessionToken. A current snapshot revision and its exact requestId. Side effects: Consumes the exact incoming request and any crossed request, creates the friendship on both sides and sends an ordinary confirmation atomically. No automatic retry. Repeating the same revision cannot create a second effect. Returns: Complete {userId,revision,friendCode,friends,incoming,outgoing,blocked,limits,serverTime} snapshot. Replace the matching host/project/player cache. lastActiveAt is the latest retained login, null when unknown; it is not online presence. Errors: 409 REVISION_CONFLICT or an uncertain response: get a new snapshot and reconcile intent, never silently replace expectedRevision and repeat. 404 FRIEND_REQUEST_NOT_FOUND means this request was removed or replaced; do not act on a newer ID. INBOX_FULL rejects the entire send/accept. Friend/request/block capacity limits reject additions while existing data remains removable. 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).

Input Schema

NameRequiredDescriptionDefault
userIdYesSigned-in player UUID matching the session
requestIdYesExact request ID from the reviewed incoming/outgoing snapshot
sessionTokenYesPlayer accessToken sent only as Authorization Bearer
targetUserIdYesThe other player UUID in the same project
expectedRevisionYesExact revision from the reviewed actor snapshot; never refresh and substitute automatically

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.9.1

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it states exactly what is consumed (the incoming request plus any crossed request), what is created on both sides, that the confirmation is sent atomically, and that repeating the same revision cannot double-apply — which operationalizes idempotentHint=true with real semantics. The error catalogue (REVISION_CONFLICT, FRIEND_REQUEST_NOT_FOUND, INBOX_FULL, capacity limits, 401/403/429) with per-code remediation is rich behavioral context the annotations cannot convey.

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?

Well front-loaded and cleanly sectioned (Use when / Not for / Requires / Side effects / Returns / Errors), with no filler about the tool's purpose. It is long and slightly redundant — 401 handling is covered twice (expired session vs. wrong HORIZON_API_KEY) — but for a destructive, revision-guarded mutation nearly every clause carries operational weight.

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 five required parameters, no output schema, and destructive+idempotent semantics, the description supplies everything an agent needs: auth prerequisites, the exact snapshot/revision contract, the full returned snapshot shape and cache-replacement instruction, the lastActiveAt caveat, and a complete error-to-recovery mapping. Nothing material is left to inference.

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 baseline is 3, but the description earns extra: it explains how to obtain sessionToken (sign in via horizon_signin_email or horizon_signin_anonymous and pass the accessToken) and stresses that expectedRevision/requestId must come from the reviewed snapshot rather than a refreshed one. That is invocation guidance the schema does not provide, though it does not document targetUserId or the userId/403 token-ownership tie in detail.

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?

Opens with a specific verb + resource ("Accepts Friend Request") and immediately qualifies the mechanism ("using the reviewed player revision"), which separates it from horizon_decline_friend_request and horizon_cancel_friend_request in the sibling list. An agent can pick this tool 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit "Use when" and "Not for" sections rule out automatic retries, automatic acceptance of crossed requests, and silent expectedRevision substitution — unusually clear exclusions for a social-write tool. It stops short of naming the sibling to use instead (e.g. decline/cancel), so it lands at 4 rather than 5.

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