Home · Tools · chat_history

chat_historyReplay the conversation.

Once a chat is in production, the agent often needs to look back — to summarise the day, to flag any unresolved question, to pull every conversation that mentioned a competitor. chat_history retrieves transcripts for a session or for an entire domain, filterable by date, intent label, or resolution status. One credit. Sub-second.

Slug
chat_history
Cost
1 credit
Latency
<1s
Rate limit
240/min

When to call this tool

Reach for it whenever the agent's job involves "look at what happened" rather than "answer right now". Daily summaries. Sales-handoff briefs. QA pulls of any session flagged as unresolved. Legal review of conversations that mentioned a regulated keyword. The filter set covers date range, intent labels, resolution flag, and a free-text contains query against the transcript.

Input schema

{ "session_id": "… (or)", "site_id": "…", "date_range": { "start", "end" }, "intent": "…", "unresolved_only": true }

Output schema

{ "messages": [{ "session_id", "role", "text", "ts" }], "summary": { "sessions", "messages" }, "credits_used": 1 }

Example invocations

1. Claude Desktop

Pull yesterday's unresolved chats on site_xyz. Summarise.

2. ChatGPT custom GPT

For "how did chats go yesterday" prompts, call chat_history
with date_range and unresolved_only: true.

3. Cursor MCP

Build a daily-digest CLI that pipes chat_history into a
Slack message.

4. n8n

{ "jsonrpc": "2.0", "method": "tools/call",
  "params": { "name": "chat_history", "arguments": { "site_id": "site_xyz", "unresolved_only": true } } }

5. Raw curl

curl -X POST https://www.mentionfox.com/mcp \
  -H "Authorization: Bearer $FOXAPIS_KEY" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"chat_history","arguments":{"session_id":"sess_b3f1"}}}'

Sample output

{
  "summary": { "sessions": 1, "messages": 8 },
  "messages": [
    { "role": "user", "text": "Hi, do you support Stripe Connect?", "ts": "…" }
  ],
  "credits_used": 1
}

Credit cost & rate limits

1 credit per call regardless of result count up to 1,000 messages. 240/min.

Error codes & recovery

404 NO_SESSIONSession id doesn't exist or is older than retention.
422 RANGE_TOO_LARGEDate range exceeds 90 days.