polarity_checkin
Records your check-in at a waypoint and triggers co-presence detection to find nearby users who checked in recently.
Instructions
Record that the user checked in at a waypoint. Triggers co-presence detection against other users' recent check-ins.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| waypoint_id | Yes | ||
| name | Yes | ||
| lat | No | ||
| lon | No | ||
| occurred_at | No |
Implementation Reference
- src/tools/index.ts:13-13 (registration)The TOOLS array where all tools including polarity_checkin are registered.
export const TOOLS: ToolDef[] = [ - src/tools/index.ts:131-143 (schema)The tool definition for polarity_checkin including name, description, and inputSchema (waypoint_id, name, lat?, lon?, occurred_at?).
{ name: "polarity_checkin", description: "Record that the user checked in at a waypoint. Triggers co-presence detection against other users' recent check-ins.", inputSchema: z .object({ waypoint_id: z.string().min(1).max(128), name: z.string().min(1).max(128), lat: z.number().optional(), lon: z.number().optional(), occurred_at: z.string().datetime().optional(), }) .strict(), - src/tools/index.ts:144-144 (handler)The handler lambda that delegates to client.checkin(...).
handler: async (input, client) => client.checkin(input as Parameters<CosmosClient["checkin"]>[0]), - src/client/cosmos.ts:123-129 (helper)CosmosClient.checkin() method that makes the HTTP POST to /api/polarity/checkin.
checkin(input: { waypoint_id: string; name: string; lat?: number; lon?: number; occurred_at?: string }) { return this.request<unknown>({ method: "POST", path: "/api/polarity/checkin", body: { polarity_user_id: this.config.polarityUserId, ...input }, }); }