delete_memento
Remove a stored memory and all its associated connections from the MCP Memento server's knowledge base.
Instructions
Delete a memento and all its relationships
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes | ID of the memory to delete |
Implementation Reference
- The handler function that executes the deletion of a memento in the database.
async def handle_delete_memento( memory_db: SQLiteMemoryDatabase, arguments: Dict[str, Any] ) -> CallToolResult: """Handle delete_memory tool call. Args: memory_db: Database instance for memory operations arguments: Tool arguments from MCP call containing: - memory_id: ID of memory to delete Returns: CallToolResult with success message or error """ memory_id = arguments["memory_id"] success = await memory_db.delete_memory(memory_id) if success: return CallToolResult( content=[ TextContent( type="text", text=f"Memory deleted successfully: {memory_id}" ) ] ) else: return CallToolResult( content=[ TextContent( type="text", text=f"Failed to delete memory (may not exist): {memory_id}", ) ], isError=True, ) - The MCP tool definition for delete_memento, including its description and input schema.
Tool( name="delete_memento", description="Delete a memento and all its relationships", inputSchema={ "type": "object", "properties": { "memory_id": { "type": "string", "description": "ID of the memory to delete", }, }, "required": ["memory_id"], - src/memento/tools/registry.py:59-59 (registration)The mapping of the delete_memento tool name to its handler function in the registry.
"delete_memento": handle_delete_memento,