Undoubtedly, the Thread and Bobbin Sewing Kit that Aunt Mildred sent from Amazon.com for Christmas will never see a stitch. The Stallion Stable Music Box might have looked pretty on the computer screen, but under the tree's flickering lights, it is frightful. The polka-dot nightgown has never been a good idea, even with free shipping.

These gifts sent via some warehouse many miles away are not only unwanted, but also a multimillion-dollar headache: They have to be repacked, labeled, dropped off and shipped back to Amazon's Island of Misfit Toys. Then a new present has to be packed, labeled and shipped again. Efficient, the process is not.

Amazon is working on a solution that could revolutionize digital gift buying. The online retailer has quietly patented a way for people to return gifts before they receive them, and the patent documents even mention poor Aunt Mildred. Amazon's innovation, not ready for this Christmas season, includes an option to "Convert all gifts from Aunt Mildred," the patent says. "For example, the user may specify such a rule because the user believes that this potential sender has different tastes than the user." In other words, the consumer could keep an online list of lousy gift-givers whose choices would be vetted before anything ships.

Amazon's idea has raised the ire of the Miss Manners crowd, which thinks the scheme rather uncouth. After all, receiving an e-mail notification of a forthcoming gift - and thereby being able to check its price - is hardly the same as unwrapping the item at home.

Anna Post, great-great-granddaughter of the late etiquette author Emily Post and spokeswoman for the Emily Post Institute, said she hopes the company realizes it is risking major backlash and abandons the idea. Because of Amazon's dominance online, she and others say they fear the idea could spread throughout the e-retailing industry, which this holiday season racked up $28 billion in gift purchases.

"This idea totally misses the spirit of gift giving," Post said. "The point of gift giving is to allow someone else to go through that action of buying something for us. Otherwise, giving a gift just becomes another one of the world's transactions."

The proposal has also brought into focus a very costly part of the e-retailing business model: Up to 30 percent of purchases are returned, and the cost of getting rejected gifts back across the country and onto shelves has online retailers scrambling for ways to reduce these expenses.

"It's in the millions of dollars, and it might even be billions," said Carl Howe, a Yankee Group consumer technology analyst. "If you can get the right gift to a person the first time, this could be a huge cost-saving invention. From a retailer's perspective, this is like gold."

Amazon's timeline for introducing the idea to consumers is unclear, as is its plan for marketing the concept without offending gift givers who take great pride in their selection of unfortunate Christmas sweaters for their favorite nieces and nephews. Officials from the Seattle retailer did not return numerous e-mail and phone requests for comment. But Amazon appears to be quite serious: Its patent was awarded not just to Amazon, but to its founder, Jeff Bezos.

Amazon's patent is 12 pages long, with numerous diagrams, including a "Gift Conversion Rules Wizard" that shows how a user could select rules such as, "No clothes with wool." The document makes for curious reading, reducing the art of gift giving to the dry language of patentry.

"It sometimes occurs that gifts purchased on-line do not meet the needs or tastes of the gift recipient," the patent says. "In some cases, concern that the gift recipient may not like a particular gift may cause the person sending the gift to be more cautious in gift selection. The person sending the gift may be less likely to take a chance on a gift that is unexpected but that the recipient might truly enjoy, opting instead for a gift that is somewhat more predictable but less likely to be converted to something else."

In even drier language - "an exemplary embodiment relates to a computer-implemented data processing system comprising a user interface and gift conversion logic" - Amazon explains complicated algorithms that help users create rules about what to do in certain gift situations, such as "Convert any gift from Aunt Mildred to a gift certificate, but only after checking with me."