@prmichaelsen/remember-mcp 2.6.3 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/agent/tasks/task-64-prevent-implicit-content-type-filtering.md +289 -0
- package/dist/server-factory.js +29 -3
- package/dist/server.js +29 -3
- package/dist/weaviate/client.d.ts +1 -1
- package/package.json +1 -1
- package/src/tools/query-memory.ts +5 -0
- package/src/tools/query-space.ts +8 -1
- package/src/tools/search-memory.ts +5 -0
- package/src/tools/search-space.ts +8 -1
- package/src/weaviate/client.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,52 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.6.5] - 2026-02-16
|
|
9
|
+
|
|
10
|
+
### 🐛 Fixed
|
|
11
|
+
|
|
12
|
+
- **CRITICAL: Fixed Schema Property Mismatch in fetchMemoryWithAllProperties**
|
|
13
|
+
- `ALL_MEMORY_PROPERTIES` constant had `trust_level` but schema has `trust`
|
|
14
|
+
- Caused publish operations to fail with schema validation error
|
|
15
|
+
- Fixed property name to match actual schema: `trust_level` → `trust`
|
|
16
|
+
- Added missing `confidence` property to the list
|
|
17
|
+
- Publish functionality now works correctly
|
|
18
|
+
|
|
19
|
+
### 🎯 Impact
|
|
20
|
+
|
|
21
|
+
- **Fixes**: Publishing memories to shared spaces now works
|
|
22
|
+
- **Unblocks**: Core publish/space functionality restored
|
|
23
|
+
- **Note**: This was introduced in v2.6.3 when creating the utility function
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## [2.6.4] - 2026-02-16
|
|
28
|
+
|
|
29
|
+
### 🔧 Improved
|
|
30
|
+
|
|
31
|
+
- **Enhanced Tool Descriptions to Prevent Over-Filtering**
|
|
32
|
+
- Added explicit warnings to all search/query tools about content type filtering
|
|
33
|
+
- Agents now instructed to NOT add content_type filters unless explicitly requested by user
|
|
34
|
+
- Prevents missed results from over-filtering by content type
|
|
35
|
+
- Improves search quality and user experience
|
|
36
|
+
|
|
37
|
+
### 📝 Changed
|
|
38
|
+
|
|
39
|
+
- Updated `remember_search_memory` description with content type filtering guidance
|
|
40
|
+
- Updated `remember_query_memory` description with content type filtering guidance
|
|
41
|
+
- Updated `remember_search_space` description with content type filtering guidance
|
|
42
|
+
- Updated `remember_query_space` description with content type filtering guidance
|
|
43
|
+
- Added ✅ CORRECT and ❌ WRONG examples to clarify when to filter
|
|
44
|
+
|
|
45
|
+
### 🎯 Impact
|
|
46
|
+
|
|
47
|
+
- **Better Search Results**: No more over-filtering by content type
|
|
48
|
+
- **More Relevant Memories**: All types included unless user specifies
|
|
49
|
+
- **Clearer Agent Behavior**: Explicit guidance on when to use filters
|
|
50
|
+
- **Improved UX**: Users get comprehensive results by default
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
8
54
|
## [2.6.3] - 2026-02-16
|
|
9
55
|
|
|
10
56
|
### 🐛 Fixed
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# Task 64: Update Search/Query Tool Descriptions - No Implicit Content Type Filtering
|
|
2
|
+
|
|
3
|
+
**Milestone**: M12 (Bug Fixes / UX Improvements)
|
|
4
|
+
**Estimated Time**: 1 hour
|
|
5
|
+
**Dependencies**: None
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
**Priority**: High
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Objective
|
|
12
|
+
|
|
13
|
+
Update all search and query tool descriptions to explicitly instruct agents to NEVER add content_type filters unless the user explicitly requests filtering by content type. This prevents agents from over-filtering results and missing relevant memories.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Context
|
|
18
|
+
|
|
19
|
+
**Current Problem**:
|
|
20
|
+
Agents are adding `content_type` filters to search queries even when users don't request them. This causes:
|
|
21
|
+
- Missed results (memories with different content types excluded)
|
|
22
|
+
- Poor search experience (user searches for "hiking" but agent filters to only "note" type)
|
|
23
|
+
- Confusion (user doesn't understand why results are limited)
|
|
24
|
+
|
|
25
|
+
**Example Bad Behavior**:
|
|
26
|
+
```
|
|
27
|
+
User: "Search for memories about hiking"
|
|
28
|
+
Agent: remember_search_memory({ query: "hiking", content_type: "note" })
|
|
29
|
+
Result: Misses "event", "activity", "location" memories about hiking
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Expected Behavior**:
|
|
33
|
+
```
|
|
34
|
+
User: "Search for memories about hiking"
|
|
35
|
+
Agent: remember_search_memory({ query: "hiking" })
|
|
36
|
+
Result: Returns ALL memories about hiking regardless of type
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**When to Filter**:
|
|
40
|
+
```
|
|
41
|
+
User: "Search for note memories about hiking"
|
|
42
|
+
Agent: remember_search_memory({ query: "hiking", content_type: "note" })
|
|
43
|
+
Result: Correctly filters to only notes
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Steps
|
|
49
|
+
|
|
50
|
+
### 1. Update remember_search_memory Description
|
|
51
|
+
|
|
52
|
+
Add explicit instruction to tool description:
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
// src/tools/search-memory.ts
|
|
56
|
+
|
|
57
|
+
export const searchMemoryTool: Tool = {
|
|
58
|
+
name: 'remember_search_memory',
|
|
59
|
+
description: `Search your personal memories using hybrid search (semantic + keyword).
|
|
60
|
+
|
|
61
|
+
⚠️ IMPORTANT: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
62
|
+
- ✅ CORRECT: User says "search for hiking" → { query: "hiking" }
|
|
63
|
+
- ❌ WRONG: User says "search for hiking" → { query: "hiking", content_type: "note" }
|
|
64
|
+
- ✅ CORRECT: User says "search for note memories about hiking" → { query: "hiking", content_type: "note" }
|
|
65
|
+
|
|
66
|
+
Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
67
|
+
// ... rest of tool definition
|
|
68
|
+
};
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 2. Update remember_query_memory Description
|
|
72
|
+
|
|
73
|
+
Add same instruction:
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
// src/tools/query-memory.ts
|
|
77
|
+
|
|
78
|
+
export const queryMemoryTool: Tool = {
|
|
79
|
+
name: 'remember_query_memory',
|
|
80
|
+
description: `Query your personal memories using natural language (RAG-optimized).
|
|
81
|
+
|
|
82
|
+
⚠️ IMPORTANT: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
83
|
+
- ✅ CORRECT: User says "what do I know about hiking?" → { query: "hiking" }
|
|
84
|
+
- ❌ WRONG: User says "what do I know about hiking?" → { query: "hiking", content_type: "note" }
|
|
85
|
+
- ✅ CORRECT: User says "what notes do I have about hiking?" → { query: "hiking", content_type: "note" }
|
|
86
|
+
|
|
87
|
+
Let the query algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
88
|
+
// ... rest of tool definition
|
|
89
|
+
};
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 3. Update remember_search_space Description
|
|
93
|
+
|
|
94
|
+
Add same instruction:
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
// src/tools/search-space.ts
|
|
98
|
+
|
|
99
|
+
export const searchSpaceTool: Tool = {
|
|
100
|
+
name: 'remember_search_space',
|
|
101
|
+
description: `Search shared spaces for published memories.
|
|
102
|
+
|
|
103
|
+
⚠️ IMPORTANT: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
104
|
+
- ✅ CORRECT: User says "search The Void for hiking" → { spaces: ["the_void"], query: "hiking" }
|
|
105
|
+
- ❌ WRONG: User says "search The Void for hiking" → { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
106
|
+
- ✅ CORRECT: User says "search The Void for note memories about hiking" → { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
107
|
+
|
|
108
|
+
Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
109
|
+
// ... rest of tool definition
|
|
110
|
+
};
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 4. Update remember_query_space Description
|
|
114
|
+
|
|
115
|
+
Add same instruction:
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
// src/tools/query-space.ts
|
|
119
|
+
|
|
120
|
+
export const querySpaceTool: Tool = {
|
|
121
|
+
name: 'remember_query_space',
|
|
122
|
+
description: `Query shared spaces using natural language (RAG-optimized).
|
|
123
|
+
|
|
124
|
+
⚠️ IMPORTANT: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
125
|
+
- ✅ CORRECT: User says "what's in The Void about hiking?" → { spaces: ["the_void"], query: "hiking" }
|
|
126
|
+
- ❌ WRONG: User says "what's in The Void about hiking?" → { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
127
|
+
- ✅ CORRECT: User says "what notes are in The Void about hiking?" → { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
128
|
+
|
|
129
|
+
Let the query algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
130
|
+
// ... rest of tool definition
|
|
131
|
+
};
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 5. Update remember_search_relationship Description (Optional)
|
|
135
|
+
|
|
136
|
+
Consider adding similar guidance:
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// src/tools/search-relationship.ts
|
|
140
|
+
|
|
141
|
+
export const searchRelationshipTool: Tool = {
|
|
142
|
+
name: 'remember_search_relationship',
|
|
143
|
+
description: `Search for relationships between memories.
|
|
144
|
+
|
|
145
|
+
⚠️ IMPORTANT: Do NOT add relationship_type filter unless the user explicitly requests filtering by type.
|
|
146
|
+
- ✅ CORRECT: User says "find relationships about hiking" → { query: "hiking" }
|
|
147
|
+
- ❌ WRONG: User says "find relationships about hiking" → { query: "hiking", relationship_type: "inspired_by" }
|
|
148
|
+
|
|
149
|
+
Let the search algorithm find ALL relevant relationships regardless of type unless explicitly requested.`,
|
|
150
|
+
// ... rest of tool definition
|
|
151
|
+
};
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 6. Test Agent Behavior
|
|
155
|
+
|
|
156
|
+
Manual testing to verify agents follow instructions:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Test 1: Generic search (should NOT add content_type)
|
|
160
|
+
User: "Search for memories about hiking"
|
|
161
|
+
Expected: { query: "hiking" }
|
|
162
|
+
Wrong: { query: "hiking", content_type: "note" }
|
|
163
|
+
|
|
164
|
+
# Test 2: Explicit type request (should add content_type)
|
|
165
|
+
User: "Search for note memories about hiking"
|
|
166
|
+
Expected: { query: "hiking", content_type: "note" }
|
|
167
|
+
|
|
168
|
+
# Test 3: Space search (should NOT add content_type)
|
|
169
|
+
User: "Search The Void for hiking trails"
|
|
170
|
+
Expected: { spaces: ["the_void"], query: "hiking trails" }
|
|
171
|
+
Wrong: { spaces: ["the_void"], query: "hiking trails", content_type: "location" }
|
|
172
|
+
|
|
173
|
+
# Test 4: Explicit type in space (should add content_type)
|
|
174
|
+
User: "Search The Void for location memories about hiking"
|
|
175
|
+
Expected: { spaces: ["the_void"], query: "hiking", content_type: "location" }
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Verification
|
|
181
|
+
|
|
182
|
+
- [ ] `remember_search_memory` description includes "Do NOT add content_type filter" warning
|
|
183
|
+
- [ ] `remember_query_memory` description includes same warning
|
|
184
|
+
- [ ] `remember_search_space` description includes same warning
|
|
185
|
+
- [ ] `remember_query_space` description includes same warning
|
|
186
|
+
- [ ] Each tool has ✅ CORRECT and ❌ WRONG examples
|
|
187
|
+
- [ ] TypeScript compiles without errors
|
|
188
|
+
- [ ] Build successful
|
|
189
|
+
- [ ] Manual test: Agent doesn't add content_type for generic searches
|
|
190
|
+
- [ ] Manual test: Agent adds content_type when explicitly requested
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Expected Output
|
|
195
|
+
|
|
196
|
+
**Tool Descriptions Before**:
|
|
197
|
+
```
|
|
198
|
+
Search your personal memories using hybrid search (semantic + keyword).
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Tool Descriptions After**:
|
|
202
|
+
```
|
|
203
|
+
Search your personal memories using hybrid search (semantic + keyword).
|
|
204
|
+
|
|
205
|
+
⚠️ IMPORTANT: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
206
|
+
- ✅ CORRECT: User says "search for hiking" → { query: "hiking" }
|
|
207
|
+
- ❌ WRONG: User says "search for hiking" → { query: "hiking", content_type: "note" }
|
|
208
|
+
- ✅ CORRECT: User says "search for note memories about hiking" → { query: "hiking", content_type: "note" }
|
|
209
|
+
|
|
210
|
+
Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Impact Analysis
|
|
216
|
+
|
|
217
|
+
**Severity**: High (affects search quality and user experience)
|
|
218
|
+
|
|
219
|
+
**Affected Tools**: 4-5 tools
|
|
220
|
+
- `remember_search_memory`
|
|
221
|
+
- `remember_query_memory`
|
|
222
|
+
- `remember_search_space`
|
|
223
|
+
- `remember_query_space`
|
|
224
|
+
- `remember_search_relationship` (optional)
|
|
225
|
+
|
|
226
|
+
**User Impact**:
|
|
227
|
+
- Better search results (no over-filtering)
|
|
228
|
+
- More relevant memories returned
|
|
229
|
+
- Clearer agent behavior
|
|
230
|
+
- Improved user experience
|
|
231
|
+
|
|
232
|
+
**Agent Impact**:
|
|
233
|
+
- Clear guidance on when to filter
|
|
234
|
+
- Reduces confusion about content_type parameter
|
|
235
|
+
- Better alignment with user intent
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Common Issues and Solutions
|
|
240
|
+
|
|
241
|
+
### Issue 1: Agent still adds content_type filters
|
|
242
|
+
|
|
243
|
+
**Cause**: Agent's base model behavior overrides tool description
|
|
244
|
+
**Solution**: Make warning more prominent with ⚠️ emoji and examples
|
|
245
|
+
|
|
246
|
+
### Issue 2: Agent never adds content_type even when requested
|
|
247
|
+
|
|
248
|
+
**Cause**: Warning too strong, agent avoids parameter entirely
|
|
249
|
+
**Solution**: Include ✅ CORRECT examples showing when to use it
|
|
250
|
+
|
|
251
|
+
### Issue 3: Unclear when "explicit request" means
|
|
252
|
+
|
|
253
|
+
**Cause**: Ambiguous language in user query
|
|
254
|
+
**Solution**: Provide clear examples in tool description
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Resources
|
|
259
|
+
|
|
260
|
+
- [Tool Descriptions Best Practices](https://modelcontextprotocol.io/docs/concepts/tools)
|
|
261
|
+
- [remember_search_memory Tool](../src/tools/search-memory.ts)
|
|
262
|
+
- [remember_query_memory Tool](../src/tools/query-memory.ts)
|
|
263
|
+
- [remember_search_space Tool](../src/tools/search-space.ts)
|
|
264
|
+
- [remember_query_space Tool](../src/tools/query-space.ts)
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Notes
|
|
269
|
+
|
|
270
|
+
- This is a documentation-only change (no code logic changes)
|
|
271
|
+
- Affects agent behavior through tool description guidance
|
|
272
|
+
- May need iteration based on observed agent behavior
|
|
273
|
+
- Consider adding to system prompt if tool descriptions aren't sufficient
|
|
274
|
+
- Could be extended to other optional filter parameters (tags, weight, etc.)
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Related Tasks
|
|
279
|
+
|
|
280
|
+
- **Task 63**: Fix empty published memories (completed)
|
|
281
|
+
- **Task 62**: Fix confirmation response storage (pending)
|
|
282
|
+
- **Task 58**: Add comment unit tests (pending)
|
|
283
|
+
- **Task 59**: Update documentation (pending)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
**Status**: Not Started
|
|
288
|
+
**Recommendation**: Implement after Task 62 to improve search UX
|
|
289
|
+
**Priority**: High - Directly impacts user experience and search quality
|
package/dist/server-factory.js
CHANGED
|
@@ -574,7 +574,9 @@ var ALL_MEMORY_PROPERTIES = [
|
|
|
574
574
|
"tags",
|
|
575
575
|
"weight",
|
|
576
576
|
"base_weight",
|
|
577
|
-
"
|
|
577
|
+
"trust",
|
|
578
|
+
// ✅ Fixed: was 'trust_level', schema has 'trust'
|
|
579
|
+
"confidence",
|
|
578
580
|
"context",
|
|
579
581
|
"location",
|
|
580
582
|
"relationships",
|
|
@@ -1570,6 +1572,11 @@ var searchMemoryTool = {
|
|
|
1570
1572
|
- "Show me notes from last week" \u2192 returns notes + any relationships created that week
|
|
1571
1573
|
|
|
1572
1574
|
**AGENT GUIDANCE**:
|
|
1575
|
+
- \u26A0\uFE0F **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add filters.types unless the user explicitly requests filtering by content type.
|
|
1576
|
+
* \u2705 CORRECT: User says "search for hiking" \u2192 { query: "hiking" }
|
|
1577
|
+
* \u274C WRONG: User says "search for hiking" \u2192 { query: "hiking", filters: { types: ["note"] } }
|
|
1578
|
+
* \u2705 CORRECT: User says "search for note memories about hiking" \u2192 { query: "hiking", filters: { types: ["note"] } }
|
|
1579
|
+
* Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.
|
|
1573
1580
|
- If search results are too narrow or miss relevant content, try remember_query_memory instead - it uses pure semantic search which is better for broader, concept-based queries. You can inform the user: "I didn't find what you're looking for with keyword search. Let me try a broader semantic search using the query tool."
|
|
1574
1581
|
- **CRITICAL**: If no results are returned, DO NOT make up or fabricate memories. Only report what was actually found. Tell the user honestly that no matching memories were found and suggest they:
|
|
1575
1582
|
* Create a new memory with the information they're looking for
|
|
@@ -2140,6 +2147,11 @@ var queryMemoryTool = {
|
|
|
2140
2147
|
- "What are my project goals?"
|
|
2141
2148
|
|
|
2142
2149
|
**AGENT GUIDANCE**:
|
|
2150
|
+
- \u26A0\uFE0F **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add filters.types unless the user explicitly requests filtering by content type.
|
|
2151
|
+
* \u2705 CORRECT: User says "what do I know about hiking?" \u2192 { query: "hiking" }
|
|
2152
|
+
* \u274C WRONG: User says "what do I know about hiking?" \u2192 { query: "hiking", filters: { types: ["note"] } }
|
|
2153
|
+
* \u2705 CORRECT: User says "what notes do I have about hiking?" \u2192 { query: "hiking", filters: { types: ["note"] } }
|
|
2154
|
+
* Let the query algorithm find ALL relevant memories regardless of type unless explicitly requested.
|
|
2143
2155
|
- If query results are too broad or include irrelevant content, try remember_search_memory instead - it uses hybrid search with keyword matching which is better for precise, specific searches. You can inform the user: "The results were too broad. Let me try a more precise keyword search using the search tool."
|
|
2144
2156
|
- **CRITICAL**: If no results are returned, DO NOT make up or fabricate memories. Only report what was actually found. Tell the user honestly that no matching memories were found and suggest they:
|
|
2145
2157
|
* Create a new memory with the information they're looking for
|
|
@@ -4223,7 +4235,14 @@ import { Filters as Filters3 } from "weaviate-client";
|
|
|
4223
4235
|
init_space_memory();
|
|
4224
4236
|
var searchSpaceTool = {
|
|
4225
4237
|
name: "remember_search_space",
|
|
4226
|
-
description:
|
|
4238
|
+
description: `Search one or more shared spaces to discover thoughts, ideas, and memories. By default, excludes comments to keep discovery clean. Set include_comments: true to include threaded discussions. Can search multiple spaces in a single query.
|
|
4239
|
+
|
|
4240
|
+
\u26A0\uFE0F **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
4241
|
+
- \u2705 CORRECT: User says "search The Void for hiking" \u2192 { spaces: ["the_void"], query: "hiking" }
|
|
4242
|
+
- \u274C WRONG: User says "search The Void for hiking" \u2192 { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
4243
|
+
- \u2705 CORRECT: User says "search The Void for note memories about hiking" \u2192 { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
4244
|
+
|
|
4245
|
+
Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
4227
4246
|
inputSchema: {
|
|
4228
4247
|
type: "object",
|
|
4229
4248
|
properties: {
|
|
@@ -4382,7 +4401,14 @@ import { Filters as Filters4 } from "weaviate-client";
|
|
|
4382
4401
|
init_space_memory();
|
|
4383
4402
|
var querySpaceTool = {
|
|
4384
4403
|
name: "remember_query_space",
|
|
4385
|
-
description:
|
|
4404
|
+
description: `Ask natural language questions about memories in shared spaces. By default, excludes comments to focus on original content. Set include_comments: true to include discussions in answers.
|
|
4405
|
+
|
|
4406
|
+
\u26A0\uFE0F **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
4407
|
+
- \u2705 CORRECT: User says "what's in The Void about hiking?" \u2192 { spaces: ["the_void"], question: "hiking" }
|
|
4408
|
+
- \u274C WRONG: User says "what's in The Void about hiking?" \u2192 { spaces: ["the_void"], question: "hiking", content_type: "note" }
|
|
4409
|
+
- \u2705 CORRECT: User says "what notes are in The Void about hiking?" \u2192 { spaces: ["the_void"], question: "hiking", content_type: "note" }
|
|
4410
|
+
|
|
4411
|
+
Let the query algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
4386
4412
|
inputSchema: {
|
|
4387
4413
|
type: "object",
|
|
4388
4414
|
properties: {
|
package/dist/server.js
CHANGED
|
@@ -620,7 +620,9 @@ var ALL_MEMORY_PROPERTIES = [
|
|
|
620
620
|
"tags",
|
|
621
621
|
"weight",
|
|
622
622
|
"base_weight",
|
|
623
|
-
"
|
|
623
|
+
"trust",
|
|
624
|
+
// ✅ Fixed: was 'trust_level', schema has 'trust'
|
|
625
|
+
"confidence",
|
|
624
626
|
"context",
|
|
625
627
|
"location",
|
|
626
628
|
"relationships",
|
|
@@ -1638,6 +1640,11 @@ var searchMemoryTool = {
|
|
|
1638
1640
|
- "Show me notes from last week" \u2192 returns notes + any relationships created that week
|
|
1639
1641
|
|
|
1640
1642
|
**AGENT GUIDANCE**:
|
|
1643
|
+
- \u26A0\uFE0F **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add filters.types unless the user explicitly requests filtering by content type.
|
|
1644
|
+
* \u2705 CORRECT: User says "search for hiking" \u2192 { query: "hiking" }
|
|
1645
|
+
* \u274C WRONG: User says "search for hiking" \u2192 { query: "hiking", filters: { types: ["note"] } }
|
|
1646
|
+
* \u2705 CORRECT: User says "search for note memories about hiking" \u2192 { query: "hiking", filters: { types: ["note"] } }
|
|
1647
|
+
* Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.
|
|
1641
1648
|
- If search results are too narrow or miss relevant content, try remember_query_memory instead - it uses pure semantic search which is better for broader, concept-based queries. You can inform the user: "I didn't find what you're looking for with keyword search. Let me try a broader semantic search using the query tool."
|
|
1642
1649
|
- **CRITICAL**: If no results are returned, DO NOT make up or fabricate memories. Only report what was actually found. Tell the user honestly that no matching memories were found and suggest they:
|
|
1643
1650
|
* Create a new memory with the information they're looking for
|
|
@@ -2208,6 +2215,11 @@ var queryMemoryTool = {
|
|
|
2208
2215
|
- "What are my project goals?"
|
|
2209
2216
|
|
|
2210
2217
|
**AGENT GUIDANCE**:
|
|
2218
|
+
- \u26A0\uFE0F **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add filters.types unless the user explicitly requests filtering by content type.
|
|
2219
|
+
* \u2705 CORRECT: User says "what do I know about hiking?" \u2192 { query: "hiking" }
|
|
2220
|
+
* \u274C WRONG: User says "what do I know about hiking?" \u2192 { query: "hiking", filters: { types: ["note"] } }
|
|
2221
|
+
* \u2705 CORRECT: User says "what notes do I have about hiking?" \u2192 { query: "hiking", filters: { types: ["note"] } }
|
|
2222
|
+
* Let the query algorithm find ALL relevant memories regardless of type unless explicitly requested.
|
|
2211
2223
|
- If query results are too broad or include irrelevant content, try remember_search_memory instead - it uses hybrid search with keyword matching which is better for precise, specific searches. You can inform the user: "The results were too broad. Let me try a more precise keyword search using the search tool."
|
|
2212
2224
|
- **CRITICAL**: If no results are returned, DO NOT make up or fabricate memories. Only report what was actually found. Tell the user honestly that no matching memories were found and suggest they:
|
|
2213
2225
|
* Create a new memory with the information they're looking for
|
|
@@ -4291,7 +4303,14 @@ import { Filters as Filters3 } from "weaviate-client";
|
|
|
4291
4303
|
init_space_memory();
|
|
4292
4304
|
var searchSpaceTool = {
|
|
4293
4305
|
name: "remember_search_space",
|
|
4294
|
-
description:
|
|
4306
|
+
description: `Search one or more shared spaces to discover thoughts, ideas, and memories. By default, excludes comments to keep discovery clean. Set include_comments: true to include threaded discussions. Can search multiple spaces in a single query.
|
|
4307
|
+
|
|
4308
|
+
\u26A0\uFE0F **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
4309
|
+
- \u2705 CORRECT: User says "search The Void for hiking" \u2192 { spaces: ["the_void"], query: "hiking" }
|
|
4310
|
+
- \u274C WRONG: User says "search The Void for hiking" \u2192 { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
4311
|
+
- \u2705 CORRECT: User says "search The Void for note memories about hiking" \u2192 { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
4312
|
+
|
|
4313
|
+
Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
4295
4314
|
inputSchema: {
|
|
4296
4315
|
type: "object",
|
|
4297
4316
|
properties: {
|
|
@@ -4450,7 +4469,14 @@ import { Filters as Filters4 } from "weaviate-client";
|
|
|
4450
4469
|
init_space_memory();
|
|
4451
4470
|
var querySpaceTool = {
|
|
4452
4471
|
name: "remember_query_space",
|
|
4453
|
-
description:
|
|
4472
|
+
description: `Ask natural language questions about memories in shared spaces. By default, excludes comments to focus on original content. Set include_comments: true to include discussions in answers.
|
|
4473
|
+
|
|
4474
|
+
\u26A0\uFE0F **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
4475
|
+
- \u2705 CORRECT: User says "what's in The Void about hiking?" \u2192 { spaces: ["the_void"], question: "hiking" }
|
|
4476
|
+
- \u274C WRONG: User says "what's in The Void about hiking?" \u2192 { spaces: ["the_void"], question: "hiking", content_type: "note" }
|
|
4477
|
+
- \u2705 CORRECT: User says "what notes are in The Void about hiking?" \u2192 { spaces: ["the_void"], question: "hiking", content_type: "note" }
|
|
4478
|
+
|
|
4479
|
+
Let the query algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
4454
4480
|
inputSchema: {
|
|
4455
4481
|
type: "object",
|
|
4456
4482
|
properties: {
|
|
@@ -37,7 +37,7 @@ export declare function getAuditCollectionName(userId: string): string;
|
|
|
37
37
|
* List of all memory properties to fetch
|
|
38
38
|
* Centralized to ensure consistency across all tools
|
|
39
39
|
*/
|
|
40
|
-
export declare const ALL_MEMORY_PROPERTIES: readonly ["user_id", "doc_type", "type", "title", "content", "tags", "weight", "base_weight", "
|
|
40
|
+
export declare const ALL_MEMORY_PROPERTIES: readonly ["user_id", "doc_type", "type", "title", "content", "tags", "weight", "base_weight", "trust", "confidence", "context", "location", "relationships", "created_at", "updated_at", "version", "attribution", "source_url", "author", "parent_id", "thread_root_id", "moderation_flags"];
|
|
41
41
|
/**
|
|
42
42
|
* Fetch a memory object by ID with all properties
|
|
43
43
|
*
|
package/package.json
CHANGED
|
@@ -35,6 +35,11 @@ export const queryMemoryTool = {
|
|
|
35
35
|
- "What are my project goals?"
|
|
36
36
|
|
|
37
37
|
**AGENT GUIDANCE**:
|
|
38
|
+
- ⚠️ **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add filters.types unless the user explicitly requests filtering by content type.
|
|
39
|
+
* ✅ CORRECT: User says "what do I know about hiking?" → { query: "hiking" }
|
|
40
|
+
* ❌ WRONG: User says "what do I know about hiking?" → { query: "hiking", filters: { types: ["note"] } }
|
|
41
|
+
* ✅ CORRECT: User says "what notes do I have about hiking?" → { query: "hiking", filters: { types: ["note"] } }
|
|
42
|
+
* Let the query algorithm find ALL relevant memories regardless of type unless explicitly requested.
|
|
38
43
|
- If query results are too broad or include irrelevant content, try remember_search_memory instead - it uses hybrid search with keyword matching which is better for precise, specific searches. You can inform the user: "The results were too broad. Let me try a more precise keyword search using the search tool."
|
|
39
44
|
- **CRITICAL**: If no results are returned, DO NOT make up or fabricate memories. Only report what was actually found. Tell the user honestly that no matching memories were found and suggest they:
|
|
40
45
|
* Create a new memory with the information they're looking for
|
package/src/tools/query-space.ts
CHANGED
|
@@ -17,7 +17,14 @@ import { handleToolError } from '../utils/error-handler.js';
|
|
|
17
17
|
*/
|
|
18
18
|
export const querySpaceTool: Tool = {
|
|
19
19
|
name: 'remember_query_space',
|
|
20
|
-
description:
|
|
20
|
+
description: `Ask natural language questions about memories in shared spaces. By default, excludes comments to focus on original content. Set include_comments: true to include discussions in answers.
|
|
21
|
+
|
|
22
|
+
⚠️ **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
23
|
+
- ✅ CORRECT: User says "what's in The Void about hiking?" → { spaces: ["the_void"], question: "hiking" }
|
|
24
|
+
- ❌ WRONG: User says "what's in The Void about hiking?" → { spaces: ["the_void"], question: "hiking", content_type: "note" }
|
|
25
|
+
- ✅ CORRECT: User says "what notes are in The Void about hiking?" → { spaces: ["the_void"], question: "hiking", content_type: "note" }
|
|
26
|
+
|
|
27
|
+
Let the query algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
21
28
|
inputSchema: {
|
|
22
29
|
type: 'object',
|
|
23
30
|
properties: {
|
|
@@ -34,6 +34,11 @@ export const searchMemoryTool = {
|
|
|
34
34
|
- "Show me notes from last week" → returns notes + any relationships created that week
|
|
35
35
|
|
|
36
36
|
**AGENT GUIDANCE**:
|
|
37
|
+
- ⚠️ **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add filters.types unless the user explicitly requests filtering by content type.
|
|
38
|
+
* ✅ CORRECT: User says "search for hiking" → { query: "hiking" }
|
|
39
|
+
* ❌ WRONG: User says "search for hiking" → { query: "hiking", filters: { types: ["note"] } }
|
|
40
|
+
* ✅ CORRECT: User says "search for note memories about hiking" → { query: "hiking", filters: { types: ["note"] } }
|
|
41
|
+
* Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.
|
|
37
42
|
- If search results are too narrow or miss relevant content, try remember_query_memory instead - it uses pure semantic search which is better for broader, concept-based queries. You can inform the user: "I didn't find what you're looking for with keyword search. Let me try a broader semantic search using the query tool."
|
|
38
43
|
- **CRITICAL**: If no results are returned, DO NOT make up or fabricate memories. Only report what was actually found. Tell the user honestly that no matching memories were found and suggest they:
|
|
39
44
|
* Create a new memory with the information they're looking for
|
|
@@ -18,7 +18,14 @@ import type { SearchFilters } from '../types/memory.js';
|
|
|
18
18
|
*/
|
|
19
19
|
export const searchSpaceTool: Tool = {
|
|
20
20
|
name: 'remember_search_space',
|
|
21
|
-
description:
|
|
21
|
+
description: `Search one or more shared spaces to discover thoughts, ideas, and memories. By default, excludes comments to keep discovery clean. Set include_comments: true to include threaded discussions. Can search multiple spaces in a single query.
|
|
22
|
+
|
|
23
|
+
⚠️ **CRITICAL - CONTENT TYPE FILTERING**: Do NOT add content_type filter unless the user explicitly requests filtering by type.
|
|
24
|
+
- ✅ CORRECT: User says "search The Void for hiking" → { spaces: ["the_void"], query: "hiking" }
|
|
25
|
+
- ❌ WRONG: User says "search The Void for hiking" → { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
26
|
+
- ✅ CORRECT: User says "search The Void for note memories about hiking" → { spaces: ["the_void"], query: "hiking", content_type: "note" }
|
|
27
|
+
|
|
28
|
+
Let the search algorithm find ALL relevant memories regardless of type unless explicitly requested.`,
|
|
22
29
|
inputSchema: {
|
|
23
30
|
type: 'object',
|
|
24
31
|
properties: {
|
package/src/weaviate/client.ts
CHANGED