Anwani

v1.1.7
io.github.Anwani-app/anwani-mcp Checked 2 days ago Published 13 days ago

Anwani: 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.

ParameterTypeDescription
code *stringAnwani 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.

ParameterTypeDescription
idempotency_key *stringClient-generated key to safely retry the same create without duplicates. Example: create-2026-11-16-home-a1b2c3d4
latitude *numberUser-provided latitude only — never invent. Example: 24.7136
longitude *numberUser-provided longitude only — never invent. Example: 46.6753
buildingNamestringBuilding name if provided. Example: برج الملقا
categorystringOptional category tag. Example: home, work, shop
citystringCity only if the user provided it. Example: الرياض
countrystringCountry name or ISO-ish label if provided. Example: السعودية or SA
floorFloor / level of the unit. Example: 5 or G
houseNumberstringHouse / unit number if provided. Example: 12
instructionsstringDelivery notes for the courier (door color, buzzer, landmark). Example: الباب الأصفر، دق الجرس
labelstringShort friendly label for the address. Example: البيت or المكتب
neighborhoodstringNeighborhood / district if provided. Example: حي الملقا
ownerNamestringDisplay name for the address owner only if the user provided one. Example: أحمد
phonestringContact phone in international or local form if provided. Example: +9665xxxxxxx
pinstringOptional 4-digit privacy PIN that couriers must enter to view details. Example: 4821
pinEnabledbooleanWhen true, details stay locked until the correct 4-digit PIN is entered. Example: true
postalCodestringPostal / ZIP code if provided. Example: 13521
saudiNationalCodestringOptional Saudi national short code (4 letters + 4 digits, AAAA####) when country is SA. Does not replace the Anwani 9-digit code. Example: RADC2959
streetstringStreet 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.

ParameterTypeDescription
changes *objectPartial address fields to update. Omit keys you do not want to change. Example: {"instructions":"الباب الأصفر","floor":5}
code *stringAnwani permanent 9-digit address code (digits 1–9 only). Example: 365131449

share_address

Returns the public deep link https://9code.app/code/{code} for an owned address as {ok, code, url, shareText}. Use it when the user wants a shareable URL; it does not modify the address. Fails if the code is invalid or not owned by the connected account.

ParameterTypeDescription
code *stringAnwani 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.

ParameterTypeDescription
code *stringAnwani permanent 9-digit address code (digits 1–9 only). Example: 365131449