> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatbotplatform.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversation Archives MCP Server

> Access archived message summaries from conversation history with date-based filtering.

## Summary

The Conversation Archives MCP server provides read-only access to archived message summaries for a conversation. Archives are automatically created periodically to preserve conversation context while managing memory. Requires conversation API key for authentication.

## Authentication

This server requires a **conversation API key**. The key is automatically provided when tools are called within an Agentic Loop.

```bash theme={null}
# Requires conversation API key
curl https://app.chatbotplatform.io/mcp/archives/call/list-archives \
  -H "Authorization: Bearer conv_xxxxx..."
```

<Callout type="info">
  **Automatic in Agentic Loops:** When using this server within an Agentic Loop, the conversation API key is provided automatically - no manual setup required.
</Callout>

## Use Cases

### Recalling Past Conversations

**User:** "What did we talk about last week?"

**Tool Calls:**

1. Time: `relative-time` with expression "last week" → Returns date range
2. `list-archives` with start\_date and end\_date from time tool
3. `get-archive` for specific archives to show full summaries

**Result:** Summaries of conversations from last week

***

### Finding Specific Information

**User:** "Didn't you recommend a restaurant in our conversation a few days ago?"

**Tool Calls:**

1. Time: `relative-time` with expression "3 days ago" → Returns specific date
2. `get-archive` with date parameter
3. Parse archive for restaurant recommendation

**Result:** Restaurant information from the archived conversation

***

### Browsing Conversation History

**User:** "Show me a summary of our recent conversations"

**Tool Calls:**

1. `list-archives` with limit 10 → Shows last 10 archive summaries

**Result:** Table of recent archives with dates, message counts, and summary previews

## Available Tools

### list-archives

List archived message summaries for the authenticated conversation.

| Parameter    | Type    | Required | Description                                               |
| ------------ | ------- | -------- | --------------------------------------------------------- |
| `start_date` | string  | No       | Filter archives from this date (YYYY-MM-DD format)        |
| `end_date`   | string  | No       | Filter archives until this date (YYYY-MM-DD format)       |
| `limit`      | integer | No       | Maximum number of archives to return (1-100, default: 30) |

**Returns:** Archives ordered by date (newest first) with date, message count, and summary preview for each.

**Example - All Recent Archives:**

```
Input: limit: 10

Output:
  Recent Archives (10 results):

  | Date | Messages | Summary |
  |------|----------|---------|
  | 2026-02-03 | 15 | User asked about Python data analysis libraries. Discussed pandas, NumPy... |
  | 2026-02-02 | 8 | User requested help with SQL query optimization. Covered indexing... |
  | 2026-02-01 | 12 | Conversation about React component patterns. Discussed hooks, context... |
```

**Example - Date Range Filter:**

```
Input:
  start_date: "2026-01-15"
  end_date: "2026-01-31"
  limit: 50

Output:
  Archives from 2026-01-15 to 2026-01-31 (12 results):

  | Date | Messages | Summary |
  |------|----------|---------|
  | 2026-01-31 | 20 | Detailed discussion about authentication patterns in web apps... |
  | 2026-01-29 | 10 | User asked about Docker deployment best practices... |
  | 2026-01-27 | 15 | Conversation focused on API rate limiting strategies... |
  ...
```

<Callout type="tip">
  **Combine with Time Utilities:** Use the Time MCP server's `relative-time` or `today` tools to convert natural language dates ("last week", "last month") to YYYY-MM-DD format for filtering.
</Callout>

***

### get-archive

Retrieve the full details of a specific archive by ID or date.

| Parameter    | Type    | Required | Description                                               |
| ------------ | ------- | -------- | --------------------------------------------------------- |
| `archive_id` | integer | No\*     | The specific archive ID to retrieve                       |
| `date`       | string  | No\*     | Fetch the archive for a specific date (YYYY-MM-DD format) |

**Returns:** Complete summary text, message count, and metadata.

<Callout type="warning">
  **Either/Or Requirement:** You must provide **either** `archive_id` **or** `date`, but not both.
</Callout>

**Example - By Date:**

```
Input: date: "2026-02-03"

Output:
  Archive for 2026-02-03:

  ID: 15789
  Date: 2026-02-03
  Messages: 15
  Created: 2026-02-04 00:05:00 UTC

  Summary:
  The user asked for recommendations on Python libraries for data analysis.
  We discussed several popular libraries:

  1. pandas - for data manipulation and analysis with DataFrames
  2. NumPy - for numerical computing and array operations
  3. Matplotlib - for data visualization
  4. Seaborn - for statistical visualizations
  5. Plotly - for interactive charts

  The user was particularly interested in pandas for working with CSV files.
  I provided code examples for reading CSVs, filtering data, and basic operations.

  The user also asked about performance considerations when working with large
  datasets. I recommended using chunking for very large files and suggested
  considering Dask for datasets that don't fit in memory.

  Metadata: {}
```

**Example - By Archive ID:**

```
Input: archive_id: 15789

Output:
  (Same output as above)
```

<Callout type="info">
  **Archive Not Found:** If no archive exists for the specified ID or date, an error is returned.
</Callout>

***

## Common Workflows

### Recalling Recent Context

<Steps>
  <Step title="Get Current Date">
    Use Time: `today` to establish current date context
  </Step>

  <Step title="Parse User's Time Reference">
    Use Time: `relative-time` to convert "last week", "3 days ago", etc. to dates
  </Step>

  <Step title="List Archives">
    Use `list-archives` with date range from time tools
  </Step>

  <Step title="Retrieve Specific Archive">
    Use `get-archive` for detailed summaries
  </Step>
</Steps>

### Searching for Specific Information

<Steps>
  <Step title="Determine Timeframe">
    Ask user when the conversation happened or estimate based on context
  </Step>

  <Step title="List Archives in Timeframe">
    Use `list-archives` with appropriate date range
  </Step>

  <Step title="Review Summaries">
    Check summary previews to identify relevant archives
  </Step>

  <Step title="Get Full Archive">
    Use `get-archive` to retrieve complete summary text
  </Step>

  <Step title="Extract Information">
    Parse the archive summary for the requested information
  </Step>
</Steps>

### Browsing History

<Steps>
  <Step title="Show Recent Archives">
    Use `list-archives` with no filters to show recent conversation history
  </Step>

  <Step title="User Selects Archive">
    User identifies which archive they want to explore
  </Step>

  <Step title="Show Full Summary">
    Use `get-archive` with the selected date or ID
  </Step>
</Steps>

***

## Archive Generation

Archives are automatically created by the platform to preserve conversation context:

### When Archives Are Created

* **Periodically:** Archives are generated at regular intervals (typically daily)
* **Context Management:** When conversation history exceeds configured limits
* **Manual Archival:** System administrators can trigger archive creation

### What's Included

* **Message Summaries:** AI-generated summaries of conversation segments
* **Message Count:** Total number of messages in the archive
* **Date:** The date range covered by the archive
* **Metadata:** Additional context (JSON format, optional)

### What's Not Included

Archives contain **summaries**, not the original messages. The original message text is not preserved in archives for privacy and storage efficiency.

<Callout type="warning">
  **Read-Only Access:** This MCP server only provides read access to archives. Archives cannot be created, modified, or deleted via these tools.
</Callout>

***

## Integration with Time Utilities

The Conversation Archives server works seamlessly with the Time Utilities MCP server for date-based filtering:

### Example: "Show me last month's archives"

```
1. Time: relative-time("last month")
   → Returns: start_date: "2026-01-01", end_date: "2026-01-31"

2. list-archives(start_date: "2026-01-01", end_date: "2026-01-31")
   → Returns: All archives from January 2026

3. get-archive(date: "2026-01-15")
   → Returns: Full summary for January 15, 2026
```

### Example: "What did we discuss 3 days ago?"

```
1. Time: relative-time("3 days ago")
   → Returns: "2026-02-01"

2. get-archive(date: "2026-02-01")
   → Returns: Complete summary for February 1, 2026
```

***

## Tips & Best Practices

* **Always use Time tools** to convert natural language dates to YYYY-MM-DD format before querying archives
* **List before getting** - Use `list-archives` first to see what's available, then `get-archive` for specific summaries
* **Date format is strict** - Use YYYY-MM-DD format only (e.g., "2026-02-04", not "Feb 4, 2026" or "2/4/2026")
* **Archives are summaries** - The original message text is not preserved; only AI-generated summaries
* **Recent conversations** may not yet have archives - Archives are typically generated daily
* **Use date ranges** to narrow results when searching for specific topics

### Date Filtering Best Practices

**Good:**

```
# Get exact date range from Time tool first
1. relative-time("last week") → start: 2026-01-27, end: 2026-02-02
2. list-archives(start_date: "2026-01-27", end_date: "2026-02-02")
```

**Avoid:**

```
# Don't guess dates or use non-standard formats
list-archives(start_date: "last week")  # Won't work - needs YYYY-MM-DD
list-archives(start_date: "2/1/2026")   # Won't work - wrong format
```

***

## Archive Retention

Archives are retained according to the platform's data retention policies:

* **Standard Retention:** Archives are typically retained indefinitely for the lifetime of the conversation
* **Privacy:** Archives are conversation-specific and only accessible with the conversation's API key
* **No Deletion:** The MCP server does not provide tools for deleting archives

<Callout type="info">
  **Privacy Note:** Archives are scoped to individual conversations. The conversation API key ensures that archives are only accessible within their original conversation context.
</Callout>

***

## Error Handling

Common errors and how to handle them:

### Archive Not Found

**Error:** "No archive found for date 2026-02-04"

**Cause:** Either no archive exists for that date, or it hasn't been generated yet.

**Solution:**

* Use `list-archives` to see which dates have archives
* Check if the date is very recent (archives are generated periodically)
* Verify the date format is correct (YYYY-MM-DD)

### Invalid Date Format

**Error:** "Invalid date format"

**Cause:** Date parameter is not in YYYY-MM-DD format.

**Solution:**

* Use Time: `relative-time` or `today` to get properly formatted dates
* Ensure format is YYYY-MM-DD (e.g., "2026-02-04", not "Feb 4" or "2/4/2026")

### Unauthorized

**Error:** "Unauthorized"

**Cause:** Conversation API key is missing or invalid.

**Solution:**

* Ensure the MCP server is being called within an Agentic Loop (which provides the key automatically)
* Verify the conversation API key is valid and hasn't been revoked

***

<Card title="API Reference" icon="code" href="https://app.chatbotplatform.io/openapi">
  View the complete API specification for Conversation Archives MCP server endpoints
</Card>
