Skip to content

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.

Hint Value
readOnlyHint true
destructiveHint false
idempotentHint true
Field Type Required Description
session_id string yes Active session ID from verify_member
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
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.

The use case runs a two-pass clustering pass that mirrors the source MCP server:

  1. Exact normalized-text match — addresses with the same normalized street/city/state form are grouped.
  2. ~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.

  • Reads session via SessionManager and refreshes its TTL.
  • Emits a HIPAA audit entry mcp.get_member_addresses with address_count, home_count, and duplicate_groups counts only — addresses and coordinates are never written to audit.
  • Requires session.LobID and session.MemberID populated by verify_member (returns an error otherwise).
  • 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_id instead of writing a duplicate)
  • Prerequisite: verify_member