Search past conversation history
search_conversation_historySearch the user's full conversation history via Postgres full-text search.
CALL search_conversation_history when the user refers to specific past messages, errors, decisions, or details that you do not already see in the live context window. Examples of when to call:
"What was that error I got on Tuesday?"
"What did we decide about stop losses last week?"
"Can you check what I said about the Alpaca key?"
When the user asks about something specific that was discussed days or weeks ago.
Rules:
Results are already scoped to the authenticated user (you cannot search other users' messages).
Results are truncated and capped. Do NOT ask for limit=20 unless the default 5 returned nothing relevant.
Messages containing secret-shaped strings (API keys, tokens, passwords) are silently dropped from results. If the user mentions a secret, tell them you cannot surface it from history.
This is FACTUAL recall. For user preferences or durable facts, use search_memory instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max messages to return. Defaults to the server-configured maximum (currently 5). Hard ceiling is 20. | |
| query | Yes | Natural-language keyword search over the user's full message history. Examples: "alpha picks API key error", "TSLA bracket order rejection", "what did we decide about stop losses". The query is passed through Postgres websearch_to_tsquery so plain English works (no boolean operators required). | |
| conversationId | No | Optional: limit search to a single conversation id. Omit to search across ALL of the user's conversations, which is the usual case. |