Skip to main content
Glama
getgapup

@gapup/mcp-knowledge

by getgapup

trend_watcher

Read-onlyIdempotent

Monitor emerging trends, regulatory shifts, and adoption signals in any market sector. Get trend cards with momentum scores and opportunity windows to time product roadmaps.

Instructions

Monitor emerging trends, regulatory shifts and adoption signals for a given market sector. Returns 5-12 trend cards, each with a momentum score (rising/stable/declining), a 3-month and 12-month outlook, opportunity windows, and recommended actions. When to use this tool: the user asks what is heating up in a market, wants to time a product roadmap or content calendar, or needs an early read on a sector. Inputs: a sector to monitor and 3-8 keywords defining the watch perimeter. Delivered by Manue, the AI CMO of the Gapup portfolio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectorYesSector to monitor (e.g. 'B2B SaaS productivity', 'EU fintech', 'climate-tech hardware')
keywordsYes3-8 keywords describing the watch perimeter
focusNoOptional context (geography, language target, comparator window, etc.)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
executiveSummaryYesBoard-ready sector overview prose
trendsYes5-12 trend cards for the sector
kpisNo3-5 headline KPI bubbles
recommendationsNoPrioritised strategic recommendations

Implementation Reference

  • The main tool implementation file for 'trend_watcher'. Defines the tool schema (input/output), and the handle function that calls the external Gapup API endpoint.
    import { callGapupEndpoint } from "../client.js";
    
    export const tool = {
      name: "trend_watcher",
      description:
        "Monitor emerging trends, regulatory shifts and adoption signals for a given market sector. Returns 5-12 trend cards, each with a momentum score (rising/stable/declining), a 3-month and 12-month outlook, opportunity windows, and recommended actions. When to use this tool: the user asks what is heating up in a market, wants to time a product roadmap or content calendar, or needs an early read on a sector. Inputs: a sector to monitor and 3-8 keywords defining the watch perimeter. Delivered by Manue, the AI CMO of the Gapup portfolio.",
      inputSchema: {
        type: "object",
        properties: {
          sector: {
            type: "string",
            minLength: 2,
            maxLength: 160,
            description: "Sector to monitor (e.g. 'B2B SaaS productivity', 'EU fintech', 'climate-tech hardware')",
          },
          keywords: {
            type: "array",
            items: { type: "string", minLength: 2, maxLength: 60 },
            minItems: 3,
            maxItems: 8,
            description: "3-8 keywords describing the watch perimeter",
          },
          focus: {
            type: "string",
            maxLength: 400,
            description: "Optional context (geography, language target, comparator window, etc.)",
          },
        },
        required: ["sector", "keywords"],
      },
      outputSchema: {
        type: "object",
        properties: {
          executiveSummary: {
            type: "string",
            description: "Board-ready sector overview prose",
          },
          trends: {
            type: "array",
            description: "5-12 trend cards for the sector",
            items: {
              type: "object",
              properties: {
                title: { type: "string" },
                momentum: { type: "string", enum: ["rising", "stable", "declining"] },
                description: { type: "string" },
                outlook3mo: { type: "string" },
                outlook12mo: { type: "string" },
                opportunityWindows: {
                  type: "array",
                  items: { type: "string" },
                },
                recommendedActions: {
                  type: "array",
                  items: { type: "string" },
                },
                sources: {
                  type: "array",
                  items: {
                    type: "object",
                    properties: {
                      url: { type: "string" },
                      excerpt: { type: "string" },
                    },
                    required: ["url"],
                  },
                },
              },
              required: ["title", "momentum", "description", "outlook3mo", "outlook12mo"],
            },
          },
          kpis: {
            type: "array",
            description: "3-5 headline KPI bubbles",
            items: {
              type: "object",
              properties: {
                label: { type: "string" },
                value: { type: "string" },
                trend: { type: "string", enum: ["up", "down", "stable"] },
              },
              required: ["label", "value"],
            },
          },
          recommendations: {
            type: "array",
            description: "Prioritised strategic recommendations",
            items: {
              type: "object",
              properties: {
                action: { type: "string" },
                rationale: { type: "string" },
                horizon: { type: "string" },
              },
              required: ["action", "rationale"],
            },
          },
        },
        required: ["executiveSummary", "trends"],
      },
      annotations: {
        readOnlyHint: true,
        idempotentHint: true,
        destructiveHint: false,
        openWorldHint: true,
        title: "Market Trend Watch",
      },
    } as const;
    
    export async function handle(input: unknown, signal?: AbortSignal): Promise<unknown> {
      return callGapupEndpoint("trend-watcher", input, signal);
    }
  • Full input and output schema definition for the trend_watcher tool, including required fields (sector, keywords), optional focus, and output structure (executiveSummary, trends[], kpis[], recommendations[]).
    export const tool = {
      name: "trend_watcher",
      description:
        "Monitor emerging trends, regulatory shifts and adoption signals for a given market sector. Returns 5-12 trend cards, each with a momentum score (rising/stable/declining), a 3-month and 12-month outlook, opportunity windows, and recommended actions. When to use this tool: the user asks what is heating up in a market, wants to time a product roadmap or content calendar, or needs an early read on a sector. Inputs: a sector to monitor and 3-8 keywords defining the watch perimeter. Delivered by Manue, the AI CMO of the Gapup portfolio.",
      inputSchema: {
        type: "object",
        properties: {
          sector: {
            type: "string",
            minLength: 2,
            maxLength: 160,
            description: "Sector to monitor (e.g. 'B2B SaaS productivity', 'EU fintech', 'climate-tech hardware')",
          },
          keywords: {
            type: "array",
            items: { type: "string", minLength: 2, maxLength: 60 },
            minItems: 3,
            maxItems: 8,
            description: "3-8 keywords describing the watch perimeter",
          },
          focus: {
            type: "string",
            maxLength: 400,
            description: "Optional context (geography, language target, comparator window, etc.)",
          },
        },
        required: ["sector", "keywords"],
      },
      outputSchema: {
        type: "object",
        properties: {
          executiveSummary: {
            type: "string",
            description: "Board-ready sector overview prose",
          },
          trends: {
            type: "array",
            description: "5-12 trend cards for the sector",
            items: {
              type: "object",
              properties: {
                title: { type: "string" },
                momentum: { type: "string", enum: ["rising", "stable", "declining"] },
                description: { type: "string" },
                outlook3mo: { type: "string" },
                outlook12mo: { type: "string" },
                opportunityWindows: {
                  type: "array",
                  items: { type: "string" },
                },
                recommendedActions: {
                  type: "array",
                  items: { type: "string" },
                },
                sources: {
                  type: "array",
                  items: {
                    type: "object",
                    properties: {
                      url: { type: "string" },
                      excerpt: { type: "string" },
                    },
                    required: ["url"],
                  },
                },
              },
              required: ["title", "momentum", "description", "outlook3mo", "outlook12mo"],
            },
          },
          kpis: {
            type: "array",
            description: "3-5 headline KPI bubbles",
            items: {
              type: "object",
              properties: {
                label: { type: "string" },
                value: { type: "string" },
                trend: { type: "string", enum: ["up", "down", "stable"] },
              },
              required: ["label", "value"],
            },
          },
          recommendations: {
            type: "array",
            description: "Prioritised strategic recommendations",
            items: {
              type: "object",
              properties: {
                action: { type: "string" },
                rationale: { type: "string" },
                horizon: { type: "string" },
              },
              required: ["action", "rationale"],
            },
          },
        },
        required: ["executiveSummary", "trends"],
      },
      annotations: {
        readOnlyHint: true,
        idempotentHint: true,
        destructiveHint: false,
        openWorldHint: true,
        title: "Market Trend Watch",
      },
    } as const;
  • src/index.ts:22-22 (registration)
    Import of the trend_watcher tool definition and handle function from its module.
    import { tool as trendWatcherTool, handle as trendWatcherHandle } from "./tools/trend-watcher.js";
  • src/index.ts:38-38 (registration)
    Registration of trend_watcher in the TOOLS array used by the MCP server to list and dispatch tool calls.
    { def: trendWatcherTool, handle: trendWatcherHandle },
  • The callGapupEndpoint helper function invoked by the trend_watcher handle to POST to the '/api/agent/trend-watcher' endpoint with auth, error handling for 401/402/404/429, and response parsing.
    export async function callGapupEndpoint(
      slug: string,
      input: unknown,
      signal?: AbortSignal
    ): Promise<unknown> {
      const apiKey = process.env.GAPUP_API_KEY;
      if (!apiKey) {
        throw new GapupAuthError(
          "GAPUP_API_KEY environment variable required. Get a free tier key (100 calls/mo) at https://hub.gapup.io/agents-api/onboard"
        );
      }
    
      const res = await fetch(`${HUB_BASE_URL}/api/agent/${slug}`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "X-Api-Key": apiKey,
          "Accept": "application/json",
          "User-Agent": "@gapup/mcp-knowledge/0.1.0",
        },
        body: JSON.stringify(input),
        signal,
      });
    
      if (res.status === 401) {
        throw new GapupAuthError(
          "Invalid or missing GAPUP_API_KEY. Verify your key at https://hub.gapup.io/agents-api/onboard"
        );
      }
    
      if (res.status === 402) {
        const body = await res.text().catch(() => "");
        throw new GapupAuthError(
          `Free tier quota exhausted or paid auth required. Upgrade at https://hub.gapup.io/agents-api (received 402: ${body.slice(0, 120)})`
        );
      }
    
      if (res.status === 404) {
        throw new GapupApiError(
          404,
          `Endpoint '${slug}' not found — check GAPUP_API_BASE_URL or update the package (npm update @gapup/mcp-knowledge)`
        );
      }
    
      if (res.status === 429) {
        const retryAfter = res.headers.get("Retry-After");
        const retryMsg = retryAfter ? ` Retry after ${retryAfter} seconds.` : "";
        const body = await res.text().catch(() => "");
        throw new GapupApiError(
          429,
          `Rate limit exceeded.${retryMsg} Upgrade your plan at https://hub.gapup.io/agents-api (received: ${body.slice(0, 100)})`
        );
      }
    
      if (!res.ok) {
        const body = await res.text().catch(() => "");
        throw new GapupApiError(res.status, body);
      }
    
      return res.json();
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds behavioral specifics: returns 5-12 trend cards with momentum score, outlooks, opportunity windows, and recommended actions. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (5 sentences) and front-loaded with purpose. The last sentence about 'Delivered by Manue' is informational but not essential. Overall efficient and structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, usage, input requirements, output structure, and high-level behavior. Since an output schema exists, the description does not need to detail return formats. It adequately complements the structured fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with detailed param descriptions. The description reiterates the inputs but does not add significant new meaning beyond what the schema provides. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool monitors emerging trends, regulatory shifts, and adoption signals for a market sector, with specific output structure. It distinguishes itself from sibling tools (e.g., competitor_intel, carbon_footprint_calculator) by focusing on market trend monitoring rather than other analytics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly includes a 'When to use this tool' section with concrete scenarios (e.g., user asks what is heating up, timing product roadmap, early read on sector). It does not mention when not to use or name alternatives, but provides clear context for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/getgapup/gapup-mcp'

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