mcp-sqlite-memory-bank 1.5.1__py3-none-any.whl → 1.6.0__py3-none-any.whl
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.
- mcp_sqlite_memory_bank/__init__.py +2 -2
- mcp_sqlite_memory_bank/__main__.py +20 -11
- mcp_sqlite_memory_bank/database.py +234 -68
- mcp_sqlite_memory_bank/prompts.py +76 -52
- mcp_sqlite_memory_bank/resources.py +250 -150
- mcp_sqlite_memory_bank/semantic.py +50 -17
- mcp_sqlite_memory_bank/server.py +203 -31
- mcp_sqlite_memory_bank/tools/__init__.py +26 -29
- mcp_sqlite_memory_bank/tools/analytics.py +225 -139
- mcp_sqlite_memory_bank/tools/basic.py +417 -7
- mcp_sqlite_memory_bank/tools/discovery.py +636 -384
- mcp_sqlite_memory_bank/tools/search.py +159 -72
- mcp_sqlite_memory_bank/types.py +6 -1
- mcp_sqlite_memory_bank/utils.py +165 -107
- {mcp_sqlite_memory_bank-1.5.1.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/METADATA +54 -6
- mcp_sqlite_memory_bank-1.6.0.dist-info/RECORD +21 -0
- mcp_sqlite_memory_bank-1.5.1.dist-info/RECORD +0 -21
- {mcp_sqlite_memory_bank-1.5.1.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/WHEEL +0 -0
- {mcp_sqlite_memory_bank-1.5.1.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/entry_points.txt +0 -0
- {mcp_sqlite_memory_bank-1.5.1.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/licenses/LICENSE +0 -0
- {mcp_sqlite_memory_bank-1.5.1.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/top_level.txt +0 -0
mcp_sqlite_memory_bank/utils.py
CHANGED
@@ -14,7 +14,13 @@ import traceback
|
|
14
14
|
from datetime import datetime
|
15
15
|
from functools import wraps
|
16
16
|
from typing import Any, Callable, Dict, List, TypeVar, cast, Union, Tuple
|
17
|
-
from .types import
|
17
|
+
from .types import (
|
18
|
+
ValidationError,
|
19
|
+
DatabaseError,
|
20
|
+
SchemaError,
|
21
|
+
MemoryBankError,
|
22
|
+
ToolResponse,
|
23
|
+
)
|
18
24
|
|
19
25
|
T = TypeVar("T", bound=Callable[..., ToolResponse])
|
20
26
|
|
@@ -35,11 +41,17 @@ def catch_errors(f: T) -> T:
|
|
35
41
|
except sqlite3.Error as e:
|
36
42
|
logging.error(f"{f.__name__} database error: {e}")
|
37
43
|
return cast(
|
38
|
-
ToolResponse,
|
44
|
+
ToolResponse,
|
45
|
+
DatabaseError(
|
46
|
+
f"Database error in {f.__name__}: {e}", {"sqlite_error": str(e)}
|
47
|
+
).to_dict(),
|
39
48
|
)
|
40
49
|
except Exception as e:
|
41
50
|
logging.error(f"Unexpected error in {f.__name__}: {e}")
|
42
|
-
return cast(
|
51
|
+
return cast(
|
52
|
+
ToolResponse,
|
53
|
+
DatabaseError(f"Unexpected error in {f.__name__}: {e}").to_dict(),
|
54
|
+
)
|
43
55
|
|
44
56
|
return cast(T, wrapper)
|
45
57
|
|
@@ -70,7 +82,9 @@ def validate_column_definition(column: Dict[str, Any]) -> None:
|
|
70
82
|
column: Dictionary with column definition (must have 'name' and 'type' keys)
|
71
83
|
"""
|
72
84
|
if not isinstance(column, dict):
|
73
|
-
raise ValidationError(
|
85
|
+
raise ValidationError(
|
86
|
+
"Column definition must be a dictionary", {"received": str(type(column))}
|
87
|
+
)
|
74
88
|
if "name" not in column or "type" not in column:
|
75
89
|
raise ValidationError(
|
76
90
|
"Column definition must have 'name' and 'type' keys",
|
@@ -96,7 +110,9 @@ def get_table_columns(conn: sqlite3.Connection, table_name: str) -> List[str]:
|
|
96
110
|
cur.execute(f"PRAGMA table_info({table_name})")
|
97
111
|
columns = [row[1] for row in cur.fetchall()]
|
98
112
|
if not columns:
|
99
|
-
raise SchemaError(
|
113
|
+
raise SchemaError(
|
114
|
+
f"Table does not exist: {table_name}", {"table_name": table_name}
|
115
|
+
)
|
100
116
|
return columns
|
101
117
|
|
102
118
|
|
@@ -118,9 +134,15 @@ def get_table_columns_by_name(table_name: str) -> Union[List[str], Dict[str, Any
|
|
118
134
|
validate_identifier(table_name, "table name")
|
119
135
|
with sqlite3.connect(os.environ.get("DB_PATH", "./test.db")) as conn:
|
120
136
|
cur = conn.cursor()
|
121
|
-
cur.execute(
|
137
|
+
cur.execute(
|
138
|
+
"SELECT name FROM sqlite_master WHERE type='table' AND name=?",
|
139
|
+
(table_name,),
|
140
|
+
)
|
122
141
|
if not cur.fetchone():
|
123
|
-
return {
|
142
|
+
return {
|
143
|
+
"success": False,
|
144
|
+
"error": f"Table '{table_name}' does not exist",
|
145
|
+
}
|
124
146
|
|
125
147
|
# Get column information
|
126
148
|
cur.execute(f"PRAGMA table_info({table_name})")
|
@@ -142,12 +164,18 @@ def validate_table_exists(conn: sqlite3.Connection, table_name: str) -> None:
|
|
142
164
|
table_name: Name of table to check
|
143
165
|
"""
|
144
166
|
cur = conn.cursor()
|
145
|
-
cur.execute(
|
167
|
+
cur.execute(
|
168
|
+
"SELECT name FROM sqlite_master WHERE type='table' AND name=?", (table_name,)
|
169
|
+
)
|
146
170
|
if not cur.fetchone():
|
147
|
-
raise SchemaError(
|
171
|
+
raise SchemaError(
|
172
|
+
f"Table does not exist: {table_name}", {"table_name": table_name}
|
173
|
+
)
|
148
174
|
|
149
175
|
|
150
|
-
def build_where_clause(
|
176
|
+
def build_where_clause(
|
177
|
+
where: Dict[str, Any], valid_columns: List[str]
|
178
|
+
) -> Union[Tuple[str, List[Any]], Dict[str, Any]]:
|
151
179
|
"""
|
152
180
|
Build a WHERE clause from a dictionary of column-value pairs.
|
153
181
|
|
@@ -168,7 +196,10 @@ def build_where_clause(where: Dict[str, Any], valid_columns: List[str]) -> Union
|
|
168
196
|
|
169
197
|
for col, val in where.items():
|
170
198
|
if col not in valid_columns:
|
171
|
-
return {
|
199
|
+
return {
|
200
|
+
"success": False,
|
201
|
+
"error": f"Invalid column in where clause: {col}",
|
202
|
+
}
|
172
203
|
conditions.append(f"{col}=?")
|
173
204
|
values.append(val)
|
174
205
|
|
@@ -194,7 +225,7 @@ def suggest_recovery(error: Exception, function_name: str) -> Dict[str, Any]:
|
|
194
225
|
"auto_recovery_available": False,
|
195
226
|
"manual_steps": [],
|
196
227
|
"documentation_links": [],
|
197
|
-
"similar_errors": []
|
228
|
+
"similar_errors": [],
|
198
229
|
}
|
199
230
|
|
200
231
|
error_str = str(error).lower()
|
@@ -202,106 +233,120 @@ def suggest_recovery(error: Exception, function_name: str) -> Dict[str, Any]:
|
|
202
233
|
|
203
234
|
# Dependency-related errors
|
204
235
|
if "sentence-transformers" in error_str or "transformers" in error_str:
|
205
|
-
suggestions.update(
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
"
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
236
|
+
suggestions.update(
|
237
|
+
{
|
238
|
+
"auto_recovery_available": True,
|
239
|
+
"install_command": "pip install sentence-transformers",
|
240
|
+
"manual_steps": [
|
241
|
+
"Install sentence-transformers: pip install sentence-transformers",
|
242
|
+
"Restart the MCP server",
|
243
|
+
"Try the semantic search operation again",
|
244
|
+
],
|
245
|
+
"explanation": "Semantic search requires the sentence-transformers library",
|
246
|
+
"fallback_available": "Keyword search is available as fallback",
|
247
|
+
}
|
248
|
+
)
|
216
249
|
|
217
250
|
# Database errors
|
218
251
|
elif "database" in error_str or "sqlite" in error_str:
|
219
|
-
suggestions.update(
|
220
|
-
|
221
|
-
"
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
"
|
229
|
-
|
252
|
+
suggestions.update(
|
253
|
+
{
|
254
|
+
"manual_steps": [
|
255
|
+
"Check if database file exists and is writable",
|
256
|
+
"Verify disk space is available",
|
257
|
+
"Check if another process is using the database",
|
258
|
+
"Try creating a new database file",
|
259
|
+
],
|
260
|
+
"auto_recovery_available": False,
|
261
|
+
"diagnostics": {
|
262
|
+
"check_db_path": "Verify DB_PATH environment variable",
|
263
|
+
"check_permissions": "Ensure write permissions to database directory",
|
264
|
+
},
|
230
265
|
}
|
231
|
-
|
266
|
+
)
|
232
267
|
|
233
268
|
# Table/schema errors
|
234
269
|
elif "table" in error_str and ("not exist" in error_str or "missing" in error_str):
|
235
|
-
suggestions.update(
|
236
|
-
|
237
|
-
|
238
|
-
"
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
270
|
+
suggestions.update(
|
271
|
+
{
|
272
|
+
"auto_recovery_available": True,
|
273
|
+
"manual_steps": [
|
274
|
+
"List available tables with list_tables()",
|
275
|
+
"Check table name spelling",
|
276
|
+
"Create the table if it doesn't exist",
|
277
|
+
"Refresh your table list",
|
278
|
+
],
|
279
|
+
"next_actions": ["call list_tables() to see available tables"],
|
280
|
+
}
|
281
|
+
)
|
245
282
|
|
246
283
|
# Column errors
|
247
284
|
elif "column" in error_str and ("not exist" in error_str or "invalid" in error_str):
|
248
|
-
suggestions.update(
|
249
|
-
|
250
|
-
|
251
|
-
"
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
285
|
+
suggestions.update(
|
286
|
+
{
|
287
|
+
"auto_recovery_available": True,
|
288
|
+
"manual_steps": [
|
289
|
+
"Use describe_table() to see available columns",
|
290
|
+
"Check column name spelling and case",
|
291
|
+
"Verify the column exists in the table schema",
|
292
|
+
],
|
293
|
+
"next_actions": ["call describe_table() to see column schema"],
|
294
|
+
}
|
295
|
+
)
|
257
296
|
|
258
297
|
# Import/module errors
|
259
298
|
elif "import" in error_str or "module" in error_str:
|
260
|
-
suggestions.update(
|
261
|
-
|
262
|
-
"
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
"
|
269
|
-
|
299
|
+
suggestions.update(
|
300
|
+
{
|
301
|
+
"manual_steps": [
|
302
|
+
"Check if required packages are installed",
|
303
|
+
"Verify Python environment is correct",
|
304
|
+
"Try reinstalling the package",
|
305
|
+
"Check for version compatibility issues",
|
306
|
+
],
|
307
|
+
"diagnostics": {
|
308
|
+
"python_version": sys.version,
|
309
|
+
"check_packages": "pip list | grep -E '(torch|transformers|sentence)'",
|
310
|
+
},
|
270
311
|
}
|
271
|
-
|
312
|
+
)
|
272
313
|
|
273
314
|
# Function/method errors (like our recent 'FunctionTool' issue)
|
274
315
|
elif "not callable" in error_str or "has no attribute" in error_str:
|
275
|
-
suggestions.update(
|
276
|
-
|
277
|
-
"
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
"
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
"
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
316
|
+
suggestions.update(
|
317
|
+
{
|
318
|
+
"manual_steps": [
|
319
|
+
"Check if you're using the correct function/method name",
|
320
|
+
"Verify the object type is what you expect",
|
321
|
+
"Check for import issues or namespace conflicts",
|
322
|
+
"Try restarting the MCP server",
|
323
|
+
],
|
324
|
+
"diagnostics": {
|
325
|
+
"object_type": "Check the actual type of the object being called",
|
326
|
+
"namespace_check": "Verify imports and module loading",
|
327
|
+
},
|
328
|
+
"likely_causes": [
|
329
|
+
"Using PyPI version instead of local development code",
|
330
|
+
"Import conflicts between different module versions",
|
331
|
+
"Object not properly initialized",
|
332
|
+
],
|
333
|
+
}
|
334
|
+
)
|
292
335
|
|
293
336
|
# Add context-specific suggestions
|
294
337
|
if function_name.startswith("semantic") or function_name.startswith("embedding"):
|
295
338
|
suggestions["context_help"] = {
|
296
339
|
"semantic_search_help": "Semantic search requires sentence-transformers and embeddings to be generated",
|
297
340
|
"embedding_help": "Use add_embeddings() and generate_embeddings() before semantic search",
|
298
|
-
"fallback_option": "Consider using search_content() for keyword-based search"
|
341
|
+
"fallback_option": "Consider using search_content() for keyword-based search",
|
299
342
|
}
|
300
343
|
|
301
344
|
return suggestions
|
302
345
|
|
303
346
|
|
304
|
-
def enhanced_catch_errors(
|
347
|
+
def enhanced_catch_errors(
|
348
|
+
include_traceback: bool = False, auto_recovery: bool = True
|
349
|
+
) -> Callable[[Callable[..., Any]], Callable[..., Any]]:
|
305
350
|
"""
|
306
351
|
Enhanced error decorator with debugging context and auto-recovery suggestions.
|
307
352
|
|
@@ -309,6 +354,7 @@ def enhanced_catch_errors(include_traceback: bool = False, auto_recovery: bool =
|
|
309
354
|
include_traceback: Whether to include full traceback in error details
|
310
355
|
auto_recovery: Whether to include auto-recovery suggestions
|
311
356
|
"""
|
357
|
+
|
312
358
|
def decorator(f: T) -> T:
|
313
359
|
@wraps(f)
|
314
360
|
def wrapper(*args: Any, **kwargs: Any) -> ToolResponse:
|
@@ -322,7 +368,7 @@ def enhanced_catch_errors(include_traceback: bool = False, auto_recovery: bool =
|
|
322
368
|
"args_preview": str(args)[:200], # Truncate for safety
|
323
369
|
"kwargs_preview": {k: str(v)[:100] for k, v in kwargs.items()},
|
324
370
|
"python_version": sys.version,
|
325
|
-
"error_type": type(e).__name__
|
371
|
+
"error_type": type(e).__name__,
|
326
372
|
}
|
327
373
|
|
328
374
|
# Add traceback if requested
|
@@ -336,30 +382,42 @@ def enhanced_catch_errors(include_traceback: bool = False, auto_recovery: bool =
|
|
336
382
|
|
337
383
|
# Determine error category
|
338
384
|
if isinstance(e, MemoryBankError):
|
339
|
-
category =
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
385
|
+
category = (
|
386
|
+
e.category.name if hasattr(e, "category") else "MEMORY_BANK"
|
387
|
+
)
|
388
|
+
return cast(
|
389
|
+
ToolResponse,
|
390
|
+
{
|
391
|
+
"success": False,
|
392
|
+
"error": str(e),
|
393
|
+
"category": category,
|
394
|
+
"details": error_context,
|
395
|
+
"recovery": recovery_suggestions,
|
396
|
+
},
|
397
|
+
)
|
347
398
|
elif isinstance(e, sqlite3.Error):
|
348
|
-
return cast(
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
399
|
+
return cast(
|
400
|
+
ToolResponse,
|
401
|
+
{
|
402
|
+
"success": False,
|
403
|
+
"error": f"Database error: {str(e)}",
|
404
|
+
"category": "DATABASE",
|
405
|
+
"details": error_context,
|
406
|
+
"recovery": recovery_suggestions,
|
407
|
+
},
|
408
|
+
)
|
355
409
|
else:
|
356
|
-
return cast(
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
410
|
+
return cast(
|
411
|
+
ToolResponse,
|
412
|
+
{
|
413
|
+
"success": False,
|
414
|
+
"error": f"Unexpected error: {str(e)}",
|
415
|
+
"category": "SYSTEM",
|
416
|
+
"details": error_context,
|
417
|
+
"recovery": recovery_suggestions,
|
418
|
+
},
|
419
|
+
)
|
363
420
|
|
364
421
|
return cast(T, wrapper)
|
422
|
+
|
365
423
|
return decorator
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp_sqlite_memory_bank
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.6.0
|
4
4
|
Summary: A dynamic, agent/LLM-friendly SQLite memory bank for MCP servers with semantic search capabilities.
|
5
5
|
Author-email: Robert Meisner <robert@catchit.pl>
|
6
6
|
License-Expression: MIT
|
@@ -9,13 +9,13 @@ Project-URL: Source, https://github.com/robertmeisner/mcp_sqlite_memory_bank
|
|
9
9
|
Project-URL: Issues, https://github.com/robertmeisner/mcp_sqlite_memory_bank/issues
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
11
|
Classifier: Operating System :: OS Independent
|
12
|
-
Requires-Python: >=3.
|
12
|
+
Requires-Python: >=3.10
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
License-File: LICENSE
|
15
15
|
Requires-Dist: fastapi>=0.100.0
|
16
16
|
Requires-Dist: uvicorn>=0.22.0
|
17
17
|
Requires-Dist: pydantic>=1.10.0
|
18
|
-
Requires-Dist: fastmcp
|
18
|
+
Requires-Dist: fastmcp>=2.9.0
|
19
19
|
Requires-Dist: sqlalchemy>=2.0.0
|
20
20
|
Requires-Dist: sentence-transformers>=2.2.0
|
21
21
|
Requires-Dist: torch>=1.9.0
|
@@ -126,10 +126,10 @@ Restart your IDE and try asking your AI assistant:
|
|
126
126
|
|
127
127
|
SQLite Memory Bank v1.4.0+ provides full Model Context Protocol (MCP) compliance with advanced features for enhanced LLM and agent integration:
|
128
128
|
|
129
|
-
### 🔧 MCP Tools (
|
129
|
+
### 🔧 MCP Tools (23 Available)
|
130
130
|
Organized into logical categories for easy discovery:
|
131
131
|
- **Schema Management** (6 tools): Table creation, modification, and inspection
|
132
|
-
- **Data Operations** (
|
132
|
+
- **Data Operations** (8 tools): CRUD operations with validation and batch processing
|
133
133
|
- **Search & Discovery** (2 tools): Content search and exploration
|
134
134
|
- **Semantic Search** (5 tools): AI-powered natural language content discovery
|
135
135
|
- **Analytics** (2 tools): Memory bank insights and statistics
|
@@ -175,7 +175,7 @@ All tools are designed for explicit, discoverable use by LLMs, agents, and devel
|
|
175
175
|
| `describe_table` | Get schema details | `table_name` (str) | None |
|
176
176
|
| `list_all_columns` | List all columns for all tables | None | None |
|
177
177
|
|
178
|
-
### Data Operations Tools (
|
178
|
+
### Data Operations Tools (8 tools)
|
179
179
|
|
180
180
|
| Tool | Description | Required Parameters | Optional Parameters |
|
181
181
|
|------|-------------|---------------------|---------------------|
|
@@ -184,6 +184,9 @@ All tools are designed for explicit, discoverable use by LLMs, agents, and devel
|
|
184
184
|
| `update_rows` | Update existing rows | `table_name` (str), `data` (dict), `where` (dict) | None |
|
185
185
|
| `delete_rows` | Delete rows from table | `table_name` (str), `where` (dict) | None |
|
186
186
|
| `run_select_query` | Run safe SELECT query | `table_name` (str) | `columns` (list[str]), `where` (dict), `limit` (int) |
|
187
|
+
| `upsert_memory` | Smart update or create memory record | `table_name` (str), `data` (dict), `match_columns` (list[str]) | None |
|
188
|
+
| `batch_create_memories` | Efficiently create multiple memory records | `table_name` (str), `data_list` (list[dict]) | `match_columns` (list[str]), `use_upsert` (bool) |
|
189
|
+
| `batch_delete_memories` | Delete multiple memory records efficiently | `table_name` (str), `conditions_list` (list[dict]) | `match_mode` (str) |
|
187
190
|
|
188
191
|
### Search & Discovery Tools (2 tools)
|
189
192
|
|
@@ -211,6 +214,51 @@ All tools are designed for explicit, discoverable use by LLMs, agents, and devel
|
|
211
214
|
|
212
215
|
Each tool validates inputs and returns consistent response formats with success/error indicators and appropriate data payloads.
|
213
216
|
|
217
|
+
## 🚀 Batch Operations & Smart Memory Management
|
218
|
+
|
219
|
+
SQLite Memory Bank provides powerful batch operations for efficient memory management:
|
220
|
+
|
221
|
+
### Smart Memory Updates
|
222
|
+
- **`upsert_memory`**: Intelligent update-or-create for preventing duplicates
|
223
|
+
- **Duplicate Prevention**: Uses match columns to find existing records
|
224
|
+
- **Flexible Matching**: Specify which columns to match for finding existing records
|
225
|
+
|
226
|
+
### Efficient Batch Processing
|
227
|
+
- **`batch_create_memories`**: Create multiple records in a single operation
|
228
|
+
- **Smart vs Fast Modes**: Choose between upsert logic (prevents duplicates) or fast insertion
|
229
|
+
- **Partial Success Handling**: Continues processing even if some records fail
|
230
|
+
- **Detailed Feedback**: Returns counts for created, updated, and failed records
|
231
|
+
|
232
|
+
### Flexible Batch Deletion
|
233
|
+
- **`batch_delete_memories`**: Delete multiple records with complex conditions
|
234
|
+
- **Flexible Matching**: Support for OR (match_any) and AND (match_all) logic
|
235
|
+
- **Condition Lists**: Delete based on multiple different criteria
|
236
|
+
- **Safe Operations**: Validates conditions before deletion
|
237
|
+
|
238
|
+
### Usage Examples
|
239
|
+
|
240
|
+
```python
|
241
|
+
# Smart memory upsert - prevents duplicates
|
242
|
+
upsert_memory('technical_decisions', {
|
243
|
+
'decision_name': 'API Design',
|
244
|
+
'chosen_approach': 'REST APIs',
|
245
|
+
'rationale': 'Better discoverability for LLMs'
|
246
|
+
}, match_columns=['decision_name'])
|
247
|
+
|
248
|
+
# Batch create with duplicate prevention
|
249
|
+
batch_create_memories('project_insights', [
|
250
|
+
{'category': 'performance', 'insight': 'Database indexing'},
|
251
|
+
{'category': 'security', 'insight': 'Input validation'},
|
252
|
+
{'category': 'architecture', 'insight': 'Microservice patterns'}
|
253
|
+
], match_columns=['category', 'insight'], use_upsert=True)
|
254
|
+
|
255
|
+
# Batch delete with flexible conditions
|
256
|
+
batch_delete_memories('old_notes', [
|
257
|
+
{'status': 'archived'},
|
258
|
+
{'created_date': '2023-01-01', 'priority': 'low'}
|
259
|
+
], match_mode='match_any') # Delete if ANY condition matches
|
260
|
+
```
|
261
|
+
|
214
262
|
---
|
215
263
|
|
216
264
|
## Transport Modes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
mcp_sqlite_memory_bank/__init__.py,sha256=watSgbtYk6AHB57GzJ09w_KXSPMqnyKFRk6cnQ5hCF0,2795
|
2
|
+
mcp_sqlite_memory_bank/__main__.py,sha256=AZ6JPKw1C2hM2MdB6opAysXFFGaO5aXcLbkMVNlxzxU,2110
|
3
|
+
mcp_sqlite_memory_bank/database.py,sha256=NadWM9QB_5TOVmtKBHwZSJjIdg4KD0TiTBn9oU4tjyw,50489
|
4
|
+
mcp_sqlite_memory_bank/prompts.py,sha256=x9EfzAaWPXlpblM2cDyPV5xuG0Q3pjXmT64g1TVQ5RM,11901
|
5
|
+
mcp_sqlite_memory_bank/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
mcp_sqlite_memory_bank/resources.py,sha256=GF_Lqr-Of6e0R2ZauCASdlfafQxZUzCHKrIU6aLkmyI,23720
|
7
|
+
mcp_sqlite_memory_bank/semantic.py,sha256=ZxYmZetn_bvqE-bW6Sy_MMpsKhXnO4KgplgVO5CvHNQ,16021
|
8
|
+
mcp_sqlite_memory_bank/server.py,sha256=V3dLdsKSJcQCWWSN_VFchHeDmxF3xfW2aA0VI8k3qps,49694
|
9
|
+
mcp_sqlite_memory_bank/types.py,sha256=kK8HUz3szwiV9cUJkO56RpnosXEssQT1t0w_166ik5k,6756
|
10
|
+
mcp_sqlite_memory_bank/utils.py,sha256=08sdnEBLFhaGg3zrqOFPkLdv2ZnTZ8ggWe-ILysNlDk,15217
|
11
|
+
mcp_sqlite_memory_bank/tools/__init__.py,sha256=00TDY78qXLdeaXxcK53xFKlEiY9flHQCuIGnEh5rghg,1786
|
12
|
+
mcp_sqlite_memory_bank/tools/analytics.py,sha256=B7Rc1t6Imf7cC4NRgjGETYdSrfMt5wqE7plr-UpaC-k,20530
|
13
|
+
mcp_sqlite_memory_bank/tools/basic.py,sha256=TSoleUkDwizaE2A4r3G2g92rNTOImXV5inhy8sBfnFQ,18414
|
14
|
+
mcp_sqlite_memory_bank/tools/discovery.py,sha256=NIYY-UX5OfzE0pLGToHF9j9KvBPzWOPM3DR3J-afWzo,57290
|
15
|
+
mcp_sqlite_memory_bank/tools/search.py,sha256=5Nek8xWPtlcBlVcHM4tDeZ1wiUxX_ispwaDOB5k6sAo,17311
|
16
|
+
mcp_sqlite_memory_bank-1.6.0.dist-info/licenses/LICENSE,sha256=KPr7eFgCJqQIjeSAcwRafbjcgm-10zkrJ7MFoTOGJQg,1092
|
17
|
+
mcp_sqlite_memory_bank-1.6.0.dist-info/METADATA,sha256=wbjNDb6LCETv8OqYiowtKObEzskMl1k6WwG87vPO8Q4,35536
|
18
|
+
mcp_sqlite_memory_bank-1.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
+
mcp_sqlite_memory_bank-1.6.0.dist-info/entry_points.txt,sha256=S9yGWiCe8f_rgcGCgbwEAX2FfJ9jXWxcc4K4Jenbcn8,150
|
20
|
+
mcp_sqlite_memory_bank-1.6.0.dist-info/top_level.txt,sha256=xQ8MTGECpWMR-9DV4H8mMqaSoZqE-C8EvpOg9E2U1wM,23
|
21
|
+
mcp_sqlite_memory_bank-1.6.0.dist-info/RECORD,,
|
@@ -1,21 +0,0 @@
|
|
1
|
-
mcp_sqlite_memory_bank/__init__.py,sha256=XHBjR2IbhTdlXtGCCUSM-4M1y-SIVTMIVx3iQXWSd14,2796
|
2
|
-
mcp_sqlite_memory_bank/__main__.py,sha256=MkEV9A5JNAi4Pt5zbKM0qguPN5v8a0GXSS0OqXeDzVM,2040
|
3
|
-
mcp_sqlite_memory_bank/database.py,sha256=E-GZ150XWgimgAi3LbATz2WlrzhOd1OcMhkuQip3BkI,46489
|
4
|
-
mcp_sqlite_memory_bank/prompts.py,sha256=nLY6rf08wU5TeSLoSxjTlwcU_OIiJeOIkJYDQM_PFpo,11762
|
5
|
-
mcp_sqlite_memory_bank/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
mcp_sqlite_memory_bank/resources.py,sha256=ozk0GYTwDxITWrUiOE735hn1v17kf8lJwIe9V1o2fb8,21680
|
7
|
-
mcp_sqlite_memory_bank/semantic.py,sha256=LTZWBnENx6G1QGqppMLanikAC_bXGjEMB79ojU6rjDg,15349
|
8
|
-
mcp_sqlite_memory_bank/server.py,sha256=YC4n_0yXrToLquCZE6iyLp_AdQUzCCNixYZm384fQno,43710
|
9
|
-
mcp_sqlite_memory_bank/types.py,sha256=Lr6RVUUrdDdHUod6IvxLFaWg3H2uezL9luL8pYKxahM,6692
|
10
|
-
mcp_sqlite_memory_bank/utils.py,sha256=1sNMlqpauqezDMd4uvjl_31qANm4K9C6HP4pGWo1Pxg,13963
|
11
|
-
mcp_sqlite_memory_bank/tools/__init__.py,sha256=hLOaeSndOAmeXGPYZmdwpnPEwE8nCqKKAaDWFENDsyE,1807
|
12
|
-
mcp_sqlite_memory_bank/tools/analytics.py,sha256=iTWZ5CVUiw3itdwvY8XEjnw8uwEYInO11LnVQU1UBas,19470
|
13
|
-
mcp_sqlite_memory_bank/tools/basic.py,sha256=6wB6r_n67WLWYGTHlpgUfTT7uFZPeAFJOX3Ly0flgyg,3604
|
14
|
-
mcp_sqlite_memory_bank/tools/discovery.py,sha256=pHwM0P2ffef3_MHFIehnWHRWzWz0vNGI8wZDN9IgVwg,53327
|
15
|
-
mcp_sqlite_memory_bank/tools/search.py,sha256=SZhxtP0t_dUr3ttIEl6CDUFcdKESVcPQSBeCpBDD250,16176
|
16
|
-
mcp_sqlite_memory_bank-1.5.1.dist-info/licenses/LICENSE,sha256=KPr7eFgCJqQIjeSAcwRafbjcgm-10zkrJ7MFoTOGJQg,1092
|
17
|
-
mcp_sqlite_memory_bank-1.5.1.dist-info/METADATA,sha256=rrGClHtmpAGrRD2fXJOa917MjGGx4dlRvPWsc27DiF4,33094
|
18
|
-
mcp_sqlite_memory_bank-1.5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
-
mcp_sqlite_memory_bank-1.5.1.dist-info/entry_points.txt,sha256=S9yGWiCe8f_rgcGCgbwEAX2FfJ9jXWxcc4K4Jenbcn8,150
|
20
|
-
mcp_sqlite_memory_bank-1.5.1.dist-info/top_level.txt,sha256=xQ8MTGECpWMR-9DV4H8mMqaSoZqE-C8EvpOg9E2U1wM,23
|
21
|
-
mcp_sqlite_memory_bank-1.5.1.dist-info/RECORD,,
|
File without changes
|
{mcp_sqlite_memory_bank-1.5.1.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/entry_points.txt
RENAMED
File without changes
|
{mcp_sqlite_memory_bank-1.5.1.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{mcp_sqlite_memory_bank-1.5.1.dist-info → mcp_sqlite_memory_bank-1.6.0.dist-info}/top_level.txt
RENAMED
File without changes
|