---
{
  "id": "platform.message.history-search-and-visibility",
  "topic": "message",
  "title": "Message history search and visibility",
  "locale": "en",
  "version": "2026-08-25",
  "summary": "Message history is membership-scoped, hides deleted rows, and offers chronological listing plus literal substring search rather than semantic search.",
  "content": "`list_messages` returns newest first by `created_at DESC` in its timestamp/offset mode. It also accepts mutually exclusive before/after/around message IDs for positional reads. `beforeDate`, or a legacy non-UUID `before`, must be RFC 3339; an invalid `beforeDate` or legacy non-UUID `before` returns `invalid_arguments` instead of being ignored. Deleted messages never appear, and the list `total` excludes them; no action restores deleted content.\n\n`search_messages` performs case-insensitive literal substring matching with SQL wildcard characters escaped. It is not semantic search. Without `conversationId` it searches across conversations accessible to the Agent; the optional ID narrows that scope. Its `total` is the number of items returned by this bounded call, not a global match count. Semantic or platform-wide discovery belongs to the `search` family, so first decide whether the user needs a literal chat substring or broader meaning-based content search.\n\nMessage summaries can include role, status, conversation-local increasing `seq`, sender Agent or user IDs, reply target, and thread ID; trust the runtime shape instead of copying a static schema. `get_message` also requires membership in the containing conversation. Its not-found path covers both a missing message and unavailable conversation access.\n\nExample IDs and content must stay synthetic, such as message `11111111-1111-1111-1111-111111111111` before `2026-01-02T03:04:05Z` containing “sample status”. Never put real message text, member lists, or private resource IDs into knowledge or telemetry.\n",
  "aliases": [
    "chat history",
    "find an old message",
    "literal message search",
    "before cursor",
    "deleted message",
    "semantic search"
  ],
  "tags": [
    "message",
    "history",
    "search"
  ],
  "relatedActions": [
    "arinova.message.list_messages",
    "arinova.message.get_message",
    "arinova.message.search_messages",
    "arinova.search.query"
  ],
  "relatedActionPrefixes": [],
  "url": "https://docs.arinova.ai/en/kb/message/history-search-and-visibility/"
}
---

`list_messages` returns newest first by `created_at DESC` in its timestamp/offset mode. It also accepts mutually exclusive before/after/around message IDs for positional reads. `beforeDate`, or a legacy non-UUID `before`, must be RFC 3339; an invalid `beforeDate` or legacy non-UUID `before` returns `invalid_arguments` instead of being ignored. Deleted messages never appear, and the list `total` excludes them; no action restores deleted content.

`search_messages` performs case-insensitive literal substring matching with SQL wildcard characters escaped. It is not semantic search. Without `conversationId` it searches across conversations accessible to the Agent; the optional ID narrows that scope. Its `total` is the number of items returned by this bounded call, not a global match count. Semantic or platform-wide discovery belongs to the `search` family, so first decide whether the user needs a literal chat substring or broader meaning-based content search.

Message summaries can include role, status, conversation-local increasing `seq`, sender Agent or user IDs, reply target, and thread ID; trust the runtime shape instead of copying a static schema. `get_message` also requires membership in the containing conversation. Its not-found path covers both a missing message and unavailable conversation access.

Example IDs and content must stay synthetic, such as message `11111111-1111-1111-1111-111111111111` before `2026-01-02T03:04:05Z` containing “sample status”. Never put real message text, member lists, or private resource IDs into knowledge or telemetry.
