memory_list_compact
Retrieve a compact list of memories showing only ID, content preview, tags, and creation date. Use filters like text search, tags, and date range to narrow results.
Instructions
[Deprecated] List memories in compact format (id, preview, tags only).
Prefer memory_list which now defaults to compact previews with richer
fields and configurable content_mode/preview_chars.
Returns minimal fields: id, content preview (first 80 chars), tags, and created_at.
Args: query: Optional text search query metadata_filters: Optional metadata filters limit: Maximum number of results to return (default: unlimited) offset: Number of results to skip (default: 0) date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y") date_to: Optional date filter (ISO format or relative like "7d", "1m", "1y") tags_any: Match memories with ANY of these tags (OR logic) tags_all: Match memories with ALL of these tags (AND logic) tags_none: Exclude memories with ANY of these tags (NOT logic)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| metadata_filters | No | ||
| limit | No | ||
| offset | No | ||
| date_from | No | ||
| date_to | No | ||
| tags_any | No | ||
| tags_all | No | ||
| tags_none | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- memora/server.py:982-1028 (handler)Handler function for memory_list_compact tool. Marked as [Deprecated] in favor of memory_list. Calls _list_memories then converts results to a compact format with id, preview (first 80 chars), tags, and created_at.
async def memory_list_compact( query: Optional[str] = None, metadata_filters: Optional[Dict[str, Any]] = None, limit: Optional[int] = None, offset: Optional[int] = 0, date_from: Optional[str] = None, date_to: Optional[str] = None, tags_any: Optional[List[str]] = None, tags_all: Optional[List[str]] = None, tags_none: Optional[List[str]] = None, ) -> Dict[str, Any]: """[Deprecated] List memories in compact format (id, preview, tags only). Prefer ``memory_list`` which now defaults to compact previews with richer fields and configurable ``content_mode``/``preview_chars``. Returns minimal fields: id, content preview (first 80 chars), tags, and created_at. Args: query: Optional text search query metadata_filters: Optional metadata filters limit: Maximum number of results to return (default: unlimited) offset: Number of results to skip (default: 0) date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y") date_to: Optional date filter (ISO format or relative like "7d", "1m", "1y") tags_any: Match memories with ANY of these tags (OR logic) tags_all: Match memories with ALL of these tags (AND logic) tags_none: Exclude memories with ANY of these tags (NOT logic) """ try: items = _list_memories(query, metadata_filters, limit, offset, date_from, date_to, tags_any, tags_all, tags_none) except ValueError as exc: return {"error": "invalid_filters", "message": str(exc)} # Convert to compact format compact_items = [] for item in items: content = item.get("content", "") preview = content[:80] + "..." if len(content) > 80 else content compact_items.append({ "id": item["id"], "preview": preview, "tags": item.get("tags", []), "created_at": item.get("created_at"), }) return {"count": len(compact_items), "memories": compact_items} - memora/server.py:983-1010 (schema)Input parameters/schema for memory_list_compact tool (defined via function signature + docstring). Accepts query, metadata_filters, limit, offset, date filters, and tag filters.
query: Optional[str] = None, metadata_filters: Optional[Dict[str, Any]] = None, limit: Optional[int] = None, offset: Optional[int] = 0, date_from: Optional[str] = None, date_to: Optional[str] = None, tags_any: Optional[List[str]] = None, tags_all: Optional[List[str]] = None, tags_none: Optional[List[str]] = None, ) -> Dict[str, Any]: """[Deprecated] List memories in compact format (id, preview, tags only). Prefer ``memory_list`` which now defaults to compact previews with richer fields and configurable ``content_mode``/``preview_chars``. Returns minimal fields: id, content preview (first 80 chars), tags, and created_at. Args: query: Optional text search query metadata_filters: Optional metadata filters limit: Maximum number of results to return (default: unlimited) offset: Number of results to skip (default: 0) date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y") date_to: Optional date filter (ISO format or relative like "7d", "1m", "1y") tags_any: Match memories with ANY of these tags (OR logic) tags_all: Match memories with ALL of these tags (AND logic) tags_none: Exclude memories with ANY of these tags (NOT logic) """ - memora/server.py:981-982 (registration)Tool registration via @mcp.tool() decorator on the FastMCP server instance. The tool name is derived from the function name memory_list_compact.
@mcp.tool() async def memory_list_compact(