Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 };
    }
  • 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) }],
        };
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vinaybhosle/agentstamp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server