MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / RecallNoteTool

Class RecallNoteTool

mini_agent/tools/note_tool.py:128–213  ·  view source on GitHub ↗

Tool for recalling recorded session notes.

Source from the content-addressed store, hash-verified

126
127
128class RecallNoteTool(Tool):
129 """Tool for recalling recorded session notes."""
130
131 def __init__(self, memory_file: str = "./workspace/.agent_memory.json"):
132 """Initialize recall note tool.
133
134 Args:
135 memory_file: Path to the note storage file
136 """
137 self.memory_file = Path(memory_file)
138
139 @property
140 def name(self) -> str:
141 return "recall_notes"
142
143 @property
144 def description(self) -> str:
145 return (
146 "Recall all previously recorded session notes. "
147 "Use this to retrieve important information, context, or decisions "
148 "from earlier in the session or previous agent execution chains."
149 )
150
151 @property
152 def parameters(self) -> dict[str, Any]:
153 return {
154 "type": "object",
155 "properties": {
156 "category": {
157 "type": "string",
158 "description": "Optional: filter notes by category",
159 },
160 },
161 }
162
163 async def execute(self, category: str = None) -> ToolResult:
164 """Recall session notes.
165
166 Args:
167 category: Optional category filter
168
169 Returns:
170 ToolResult with notes content
171 """
172 try:
173 if not self.memory_file.exists():
174 return ToolResult(
175 success=True,
176 content="No notes recorded yet.",
177 )
178
179 notes = json.loads(self.memory_file.read_text())
180
181 if not notes:
182 return ToolResult(
183 success=True,
184 content="No notes recorded yet.",
185 )

Callers 9

test_empty_notesFunction · 0.90
test_note_persistenceFunction · 0.90
test_basic_agent_usageFunction · 0.90
test_session_memory_demoFunction · 0.90
demo_direct_note_usageFunction · 0.90
demo_agent_with_notesFunction · 0.90
demo_full_agentFunction · 0.90

Calls

no outgoing calls

Tested by 6

test_empty_notesFunction · 0.72
test_note_persistenceFunction · 0.72
test_basic_agent_usageFunction · 0.72
test_session_memory_demoFunction · 0.72