get_trending
Retrieve trending wish categories and their velocity data from the Wishing Well to identify popular demand patterns.
Instructions
Get trending wish categories and velocity from the Wishing Well.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/queries.js:133-146 (handler)The implementation logic for getTrending which calculates trending categories and wish counts from the database.
function getTrending() { const db = getDb(); const topCategories = db.prepare( 'SELECT category, COUNT(*) as count FROM wishes GROUP BY category ORDER BY count DESC' ).all(); const thisWeek = db.prepare( "SELECT COUNT(*) as count FROM wishes WHERE created_at >= date('now', '-7 days')" ).get().count; const today = db.prepare( "SELECT COUNT(*) as count FROM wishes WHERE created_at >= date('now')" ).get().count; return { top_categories: topCategories, wishes_today: today, wishes_this_week: thisWeek }; } - src/mcp-server.js:166-176 (registration)The MCP tool registration for get_trending in mcp-server.js.
server.tool( 'get_trending', 'Get trending wish categories and velocity from the Wishing Well.', {}, async () => { const trending = queries.getTrending(); return { content: [{ type: 'text', text: JSON.stringify(trending, null, 2) }], }; } );