github doobidoo/mcp-memory-service v10.46.0
v10.46.0 — stale_days filter for memory_list

5 hours ago

Highlights

Dormant memory detection: Pass stale_days=N to memory_list to surface memories not accessed in the last N days — ideal for reviewing, consolidating, or purging stale knowledge.

What's New

Added

  • [#784] stale_days filter for memory_list (PR #796, @filhocf): Adds an optional stale_days integer parameter to the memory_list tool and REST endpoint. Memories whose COALESCE(last_accessed, created_at) timestamp falls strictly before now - stale_days * 86400 seconds are considered stale. Memories accessed exactly at the threshold are NOT stale (strict < semantics). Memories that have never been read (last_accessed IS NULL) fall back to created_at, so never-accessed memories appear in stale results when their creation date is old enough. The filter composes freely with the existing tags, memory_type, and pagination parameters.

    Backend coverage:

    • SQLite-vec: fully implemented
    • Cloudflare, Hybrid, Milvus: parameter accepted, ignored (returns all memories — no silent wrong results)

    Refactor: _apply_stale_days_filter extracted as a static helper shared between get_all_memories and count_all_memories.

    8 new tests in tests/storage/test_stale_days.py:

    • test_stale_days_returns_old_memories
    • test_stale_days_excludes_recent_memories
    • test_stale_days_boundary_not_stale (29 days != stale at threshold 30)
    • test_stale_days_null_last_accessed_uses_created_at
    • test_stale_days_with_tag_filter
    • test_stale_days_with_memory_type_filter
    • test_stale_days_pagination
    • test_no_stale_days_returns_all (backward compat)

Layers Touched

Tool definition → handler → MemoryService → BaseStorage interface → sqlite_vec storage → cloudflare/hybrid/milvus stubs.

Test Count

~1,772 tests (up from ~1,764 in v10.45.1).

Special Thanks

Huge thanks to @filhocf for yet another high-quality contribution — clean implementation, thorough test coverage, and a well-scoped refactor. This is the fifth consecutive release featuring @filhocf's work. Closes #784.

Full Changelog

See CHANGELOG.md for complete details.

Don't miss a new mcp-memory-service release

NewReleases is sending notifications on new releases.