conversations_by_date
Retrieve conversations from a specific date to analyze historical discussions, track idea evolution, and review past interactions using YYYY-MM-DD format.
Instructions
Get conversations from a specific date (YYYY-MM-DD format).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| limit | No |
Implementation Reference
- The conversations_by_date function is defined as an MCP tool and retrieves conversations for a given date from the database.
@mcp.tool() def conversations_by_date(date: str, limit: int = 30) -> str: """ Get conversations from a specific date (YYYY-MM-DD format). """ con = get_conversations() results = con.execute(""" SELECT DISTINCT conversation_id, conversation_title, source, model, created FROM conversations WHERE CAST(created AS DATE) = CAST(? AS DATE) ORDER BY created DESC LIMIT ? """, [date, limit]).fetchall() if not results: return f"No conversations found on {date}" output = [f"## Conversations on {date} ({len(results)} found)\n"] for conv_id, title, source, model, _ in results: output.append(f"- **{title or 'Untitled'}**") output.append(f" {source}/{model} | ID: {conv_id[:20]}...") return "\n".join(output)