Anwani
v1.1.7Anwani: digital addressing — permanent 9-digit codes for physical locations.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
check_session
Returns connection status for the signed-in Anwani user as {ok, connected, scopes, expiresAt}. Identity comes from the saved OAuth token (no parameters) and never includes Firebase UIDs or internal IDs. Use it when unsure the user is signed in before calling address tools; do not use it to list or change addresses (use list_addresses, get_address, create_address, patch_address instead). Read-only.
list_addresses
Returns all addresses owned by the connected account as {ok, addresses[]} (same quota as app/Telegram, typically up to 10), newest updates first. Use it to browse or when you do not yet know a 9-digit code; use get_address when you already have a code. Read-only; the account comes from OAuth.
get_address
Returns one owned address by its permanent 9-digit code as {ok, address}. Use it when the user already provided a code; use list_addresses to discover codes. Fails clearly if the code is invalid or not owned by the connected account. Read-only; does not mutate.
| Parameter | Type | Description |
|---|---|---|
code * | string | Anwani permanent 9-digit address code (digits 1–9 only). Example: 365131449 |
create_address
Creates one new permanent 9-digit Anwani address within the account quota and returns {ok, code, created, url}. Requires a real user-provided latitude/longitude (map pin) — NEVER invent coordinates, city, or name; if the user gave no location (coords, Maps link, or clear place), ask first and do not call with sample data. Use it for new places; use patch_address to edit an existing code. Not idempotent unless the same idempotency_key is retried, which returns the original result.
| Parameter | Type | Description |
|---|---|---|
idempotency_key * | string | Client-generated key to safely retry the same create without duplicates. Example: create-2026-11-16-home-a1b2c3d4 |
latitude * | number | User-provided latitude only — never invent. Example: 24.7136 |
longitude * | number | User-provided longitude only — never invent. Example: 46.6753 |
buildingName | string | Building name if provided. Example: برج الملقا |
category | string | Optional category tag. Example: home, work, shop |
city | string | City only if the user provided it. Example: الرياض |
country | string | Country name or ISO-ish label if provided. Example: السعودية or SA |
floor | Floor / level of the unit. Example: 5 or G | |
houseNumber | string | House / unit number if provided. Example: 12 |
instructions | string | Delivery notes for the courier (door color, buzzer, landmark). Example: الباب الأصفر، دق الجرس |
label | string | Short friendly label for the address. Example: البيت or المكتب |
neighborhood | string | Neighborhood / district if provided. Example: حي الملقا |
ownerName | string | Display name for the address owner only if the user provided one. Example: أحمد |
phone | string | Contact phone in international or local form if provided. Example: +9665xxxxxxx |
pin | string | Optional 4-digit privacy PIN that couriers must enter to view details. Example: 4821 |
pinEnabled | boolean | When true, details stay locked until the correct 4-digit PIN is entered. Example: true |
postalCode | string | Postal / ZIP code if provided. Example: 13521 |
saudiNationalCode | string | Optional Saudi national short code (4 letters + 4 digits, AAAA####) when country is SA. Does not replace the Anwani 9-digit code. Example: RADC2959 |
street | string | Street name if the user provided it. Example: شارع التحلية |
patch_address
Updates only the fields present in `changes` on an owned address and returns the result; omitted fields stay unchanged. Coordinates are immutable after create. Use it to edit label, instructions, floor and similar fields; use create_address for a new pin; use delete_address only to remove an address permanently. Fails if the code is not owned by the connected account.
| Parameter | Type | Description |
|---|---|---|
changes * | object | Partial address fields to update. Omit keys you do not want to change. Example: {"instructions":"الباب الأصفر","floor":5} |
code * | string | Anwani permanent 9-digit address code (digits 1–9 only). Example: 365131449 |
delete_address
Permanently deletes an owned address and its photos (irreversible) and returns {ok, deleted}. Prefer patch_address for edits; confirm user intent before calling. Fails if the code is not owned by the connected account.
| Parameter | Type | Description |
|---|---|---|
code * | string | Anwani permanent 9-digit address code (digits 1–9 only). Example: 365131449 |