MCPcopy Create free account
hub / github.com/IBM/mcp-cli / MemoryCommand

Class MemoryCommand

src/mcp_cli/commands/memory/memory.py:26–538  ·  view source on GitHub ↗

View AI virtual memory state and manage persistent memories.

Source from the content-addressed store, hash-verified

24
25
26class MemoryCommand(UnifiedCommand):
27 """View AI virtual memory state and manage persistent memories."""
28
29 @property
30 def name(self) -> str:
31 return "memory"
32
33 @property
34 def aliases(self) -> list[str]:
35 return ["vm", "mem"]
36
37 @property
38 def description(self) -> str:
39 return "View AI virtual memory state and manage persistent memories"
40
41 @property
42 def help_text(self) -> str:
43 return """
44View AI virtual memory state and manage persistent memories.
45
46VM Subcommands (requires --vm flag):
47 /memory - Summary dashboard (mode, pages, utilization, metrics)
48 /memory pages - Table of all memory pages
49 /memory page <id> - Detailed view of a specific page
50 /memory page <id> --download - Download page content to file
51 /memory stats - Full debug dump of all VM subsystem stats
52
53Persistent Memory Subcommands:
54 /memory list [workspace|global] - List persistent memories
55 /memory add <scope> <key> <content> - Add a memory
56 /memory remove <scope> <key> - Remove a memory
57 /memory clear <scope> - Clear all memories in a scope
58
59Aliases: /vm, /mem
60
61Examples:
62 /vm - Quick overview of VM state
63 /memory list workspace - List workspace memories
64 /memory add global test_framework "always use pytest"
65 /memory remove workspace db_type
66 /memory clear global
67"""
68
69 @property
70 def modes(self) -> CommandMode:
71 return CommandMode.CHAT
72
73 @property
74 def parameters(self) -> list[CommandParameter]:
75 return [
76 CommandParameter(
77 name="action",
78 type=str,
79 required=False,
80 help="Subcommand: pages, page <id>, stats",
81 ),
82 ]
83

Callers 3

register_all_commandsFunction · 0.90
_make_commandFunction · 0.90
demo_8_memory_downloadFunction · 0.90

Calls

no outgoing calls

Tested by 1

_make_commandFunction · 0.72