Skip to main content
Glama

Remove Friend

horizon_remove_friend
DestructiveIdempotent

Removes an existing friend from both players' friend lists using the reviewed snapshot revision, returning an updated social snapshot; use only after an explicit player request.

Instructions

Removes Friend 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. Side effects: Removes the friendship on both sides. Pending requests and blocks remain unchanged. 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
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.7/5.0
Behavior5/5

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

Annotations already identify this as destructive, idempotent, non-read-only, and open-world, but the description adds substantial context beyond them: it explains that removal affects both sides, that pending requests and blocks are unchanged, that there is no automatic retry, and that repeating the same revision cannot create a second effect. It also covers authentication requirements, error behavior, rate limiting, and conflict handling in detail.

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

Conciseness5/5

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

The description is long but highly structured and front-loaded: purpose, usage, requirements, side effects, return value, and errors appear in a logical order. Every section provides actionable information for a complex destructive social operation.

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 four-parameter destructive mutation with no output schema, the description is complete: it explains authentication, revision semantics, exact side effects, returned snapshot contents, cache replacement, and error recovery paths. Nothing critical for correct invocation appears to be missing.

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 the schema already documents all four parameters, including userId, sessionToken, targetUserId, and expectedRevision. The description adds some useful context, such as obtaining the session token via sign-in and treating expectedRevision as a reviewed snapshot, but most parameter meaning is already provided by 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 description states a specific verb and resource ("Removes Friend") and clarifies the revision-scoped nature of the operation. It also distinguishes the effect from related social actions by noting that pending requests and blocks remain unchanged.

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 when-to-use guidance ("the player explicitly requests this social action") and explicit when-not-to-use guidance for automatic retries, crossed requests, and unreconciled revision changes. The error section reinforces the correct alternative path for 409 conflicts.

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