Skip to main content
Glama

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
NameRequiredDescriptionDefault
dateYes
limitNo

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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mordechaipotash/brain-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server