list_visits
List current, expired, and denied gate visits for an apartment, providing visitor details, timings, and approval status.
Instructions
List current, past (expired), and denied visits for an apartment.
Use this when the user asks about gate activity (current, historical, or denied): "who's at the gate?", "who came today?", "show past visitors", "any denied entries?", "who visited recently?", "what deliveries came in?", "what deliveries are coming today?". Do NOT use for pending pre-approvals that haven't arrived — use list_expected for that.
Returns all categories in one call. Each category is a separate list:
data.current: visitors presently at the gate (checked in, not yet out)
data.expired: completed past visits (checked in and checked out)
data.denied: entry attempts that were denied at the gate
data.pending: pre-approved visits not yet arrived (overlaps with list_expected)
Each visit entry includes: company, visitor name/phone, inTime, outTime,
gate name, approvedBy, approvalType, visitorType, and approval status.
Company is at the top-level company field and also at
visitorProfile.company.
Call get_user_multiprofile_info first to obtain the apartment_id if not already known. Skip if the user explicitly provided it.
Args: apartment_id: The apartment ID to list visits for. Fetch from get_user_multiprofile_info → data.apartments.apartment.id. page: Page number, 1-indexed. Default 1. Applies to all lists. page_size: Number of results per page. Default 10. fields: Dot-notation paths to filter the response. Strongly recommended — omitting returns all four categories with full visitor data, which is large. Use fields to fetch only what the query needs: ["data.current"] → who's at the gate right now ["data.expired"] → today's completed visits ["data.current", "data.expired"] → active + past visits ["data.expired.company", "data.expired.inTime"] → company + entry time ["data.currentTotal", "data.expiredTotal", "data.deniedTotal"] → counts only Omit only if the user explicitly wants everything.
Returns the raw API response dict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| fields | No | ||
| page_size | No | ||
| apartment_id | Yes |