ofw_list_messages
Retrieve cached OurFamilyWizard messages filtered by folder, date range, or topic. Auto-refresh syncs stale data so you get verified, complete results.
Instructions
List messages from the local OurFamilyWizard cache. Supports filtering by folder, date range, and a substring query on subject+body. Pagination is offset-based (1-based page) but if you know what you want (a date range, a topic), prefer the filters over walking pages — the cache may have 1000+ messages. Results are newest-first by default; sort:"oldest" starts at the old end of a range instead of paging to it. Returns an explicit complete boolean describing the RESULT SET: true means "this is every message on OurFamilyWizard matching these filters as of freshness.asOf" — check it before asserting a count. An empty result from a cache that is not verified-fresh is REFUSED (result:"UNVERIFIED_EMPTY") rather than reported as an absence; pass autoRefresh:true to sync and answer instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Substring match on subject AND body (case-insensitive). Use to find messages on a specific topic. | |
| page | No | Page number (default 1) | |
| size | No | Messages per page (default 50) | |
| sort | No | Result order: "newest" (default, newest first) or "oldest" (oldest first). This decides which end a truncated page keeps — with "newest" page 1 of a wide date range holds its most RECENT slice, with "oldest" its earliest. Use "oldest" to start at the old end of a range instead of paging to it. | |
| view | No | Response shape: "compact" (default) drops fields the response already carries elsewhere; "full" returns every field this server understands. compact omits OurFamilyWizard's raw `listData` echo, which duplicates this record's own id, subject, sentAt, recipients and read flag; the sender is promoted to `from`, and `files`/`replied` are kept. Pass "full" for the echo. | |
| since | No | ISO date or datetime — only messages with sent_at >= since (inclusive) | |
| until | No | ISO date or datetime — only messages with sent_at < until (exclusive) | |
| folderId | No | Folder name: "inbox", "sent", or "both" (default "both") | |
| autoRefresh | No | If the result comes back EMPTY from a cache that is not verified-fresh, sync the backing folders first and answer from the refreshed cache instead of refusing. Defaults to the OFW_AUTO_REFRESH env var (false unless set), in which case the call refuses with result:"UNVERIFIED_EMPTY" and names the remedy. Costs OFW requests when it fires. |