Check whether this user was seen before
xego_check_pairwise_seen_beforeChecks whether a given pairwise ID has already been seen within this audience. It protects against one person acting as several different users (multiple accounts, repeat voting, and similar).
WHEN TO USE: returning-user checks and one-human-one-vote. Requires a pairwise_id previously obtained from a verify call for YOUR audience.
Only the pair (audience, pairwise_id) and the time of first occurrence are recorded. No personal data.
The ledger is PERMANENT and shared across every instance and session of the server (Postgres) — it survives restarts and new MCP sessions. record_if_new=true writes atomically (no window for a concurrent write).
Args:
audience (string): the service domain or URL. Normalized to a bare lowercase hostname — the same key the proof was issued under, so a domain and its URL form are the same audience.
pairwise_id (string): the identifier from xego_verify_proof.
record_if_new (boolean): record the user if they are new.
Returns (JSON): { "seen_before": boolean, // true = already on record "first_seen": number|null, // Unix time of first occurrence "recorded_now": boolean // true = recorded just now }
Errors (free, no sybil check performed): invalid_audience (the audience cannot be normalized to a domain), dedup_store_unavailable (temporary — retry). Neither ever means 'not seen before'.
PAID TOOL (x402): this call costs $0.01 USD in USDC per execution, unless you send a valid X-EGO pilot operator key as an 'Authorization: Bearer ' HTTP header (operator calls are free). Calling without payment returns an x402 error whose _meta["x402/error"] contains payment requirements (accepts) and step-by-step instructions how to pay and retry. Invalid input is rejected for free before any payment is taken.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audience | Yes | The service being asked about. Domain (forum.example.com) or full URL (https://forum.example.com/...) — both are normalized to a bare lowercase hostname, exactly like the token's aud. | |
| pairwise_id | Yes | The user's pairwise identifier (from the xego_verify_proof result). | |
| record_if_new | No | If true and the user has not been seen yet, they are recorded immediately — an atomic 'is new? then mark' in one call. |