polarity_declare
Declare your future presence at a waypoint by specifying location, start/end times, and a time-window chip (e.g., next_30, tonight).
Instructions
Declare future presence at a waypoint. chip is the time-window enum: next_30, next_hour, tonight, tomorrow_night.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| waypoint_id | Yes | ||
| name | Yes | ||
| lat | No | ||
| lon | No | ||
| starts_at | Yes | ||
| ends_at | Yes | ||
| chip | Yes |
Implementation Reference
- src/tools/index.ts:146-163 (registration)Registration of the 'polarity_declare' tool in the TOOLS array, defining its name, description, input schema, and handler.
{ name: "polarity_declare", description: "Declare future presence at a waypoint. `chip` is the time-window enum: next_30, next_hour, tonight, tomorrow_night.", 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(), starts_at: z.string().datetime(), ends_at: z.string().datetime(), chip: ChipEnum, }) .strict(), handler: async (input, client) => client.declare(input as Parameters<CosmosClient["declare"]>[0]), }, - src/tools/index.ts:150-160 (schema)Zod input schema for polarity_declare: waypoint_id, name, lat, lon, starts_at, ends_at, and chip enum.
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(), starts_at: z.string().datetime(), ends_at: z.string().datetime(), chip: ChipEnum, }) .strict(), - src/tools/index.ts:11-11 (helper)ChipEnum definition used by polarity_declare's schema (next_30, next_hour, tonight, tomorrow_night).
const ChipEnum = z.enum(["next_30", "next_hour", "tonight", "tomorrow_night"]); - src/tools/index.ts:161-162 (handler)Handler function that delegates to client.declare(), passing parsed input as parameters to CosmosClient's declare method.
handler: async (input, client) => client.declare(input as Parameters<CosmosClient["declare"]>[0]), - src/client/cosmos.ts:131-145 (helper)CosmosClient.declare() method — makes the actual POST request to /api/polarity/declare with polarity_user_id and input body.
declare(input: { waypoint_id: string; name: string; lat?: number; lon?: number; starts_at: string; ends_at: string; chip: "next_30" | "next_hour" | "tonight" | "tomorrow_night"; }) { return this.request<unknown>({ method: "POST", path: "/api/polarity/declare", body: { polarity_user_id: this.config.polarityUserId, ...input }, }); }