get_member_addresses
Status: Implemented | Module: member
List all saved addresses on the verified member’s profile. Always call this BEFORE update_member_address so you can (a) re-use an existing address instead of creating a duplicate, and (b) see which address is currently flagged home. The response includes a home_count and duplicate_groups — if the member already has an address that matches the one they just mentioned, refer to it by place_id / name instead of adding another copy.
Annotations
Section titled “Annotations”| Hint | Value |
|---|---|
| readOnlyHint | true |
| destructiveHint | false |
| idempotentHint | true |
| Field | Type | Required | Description |
|---|---|---|---|
session_id |
string | yes | Active session ID from verify_member |
Output
Section titled “Output”| Field | Type | Description |
|---|---|---|
status |
string | success or error |
addresses |
AddressEntry[] | Member’s saved places (may be empty) |
count |
int | Number of addresses returned |
home_count |
int | Number of rows currently flagged is_home=true. >1 is a data-quality warning. |
duplicate_groups |
string[][] | Clusters of place_ids that point to the same physical place |
message |
string | Human summary |
guidance |
Guidance | Next-step suggestion |
AddressEntry Fields
Section titled “AddressEntry Fields”| Field | Type | Description |
|---|---|---|
place_id |
string | Saved-place UUID |
name |
string | Optional label (e.g. Home, Work, Dialysis Center) |
address |
string | Full formatted address |
latitude |
float | Latitude (when geocoded) |
longitude |
float | Longitude (when geocoded) |
is_home |
bool | Whether this is the member’s home address |
duplicate_key |
string | Normalized-text key shared with at least one other row in the response. Empty when the row is unique. |
Duplicate Clustering
Section titled “Duplicate Clustering”The use case runs a two-pass clustering pass that mirrors the source MCP server:
- Exact normalized-text match — addresses with the same normalized street/city/state form are grouped.
- ~50 m lat/lon proximity — remaining rows with coordinates within roughly 50 meters of one another are grouped.
Each group is returned as a []place_id entry in duplicate_groups. Rows that are part of a duplicate cluster also carry a non-empty duplicate_key for quick identification.
Side Effects
Section titled “Side Effects”- Reads session via
SessionManagerand refreshes its TTL. - Emits a HIPAA audit entry
mcp.get_member_addresseswithaddress_count,home_count, andduplicate_groupscounts only — addresses and coordinates are never written to audit. - Requires
session.LobIDandsession.MemberIDpopulated byverify_member(returns an error otherwise).
Related
Section titled “Related”- Source:
internal/app/member/usecases/get_member_addresses.go,internal/app/member/register.go - Companion: update_member_address (uses the same dedup rules — pass an existing
place_idinstead of writing a duplicate) - Prerequisite: verify_member