Skip to main content
Glama

TikTok Scripts | InayaFlow

TikTok trends in a niche this week

get_tiktok_niche_trends
Read-only

Use this when someone asks what is trending or working in a TikTok niche this week, or wants ideas based on what a niche is posting now. Input: a niche or topic in plain words (for example skincare, gym, TikTok Shop finds, personal finance). Returns the stored public posts with the most views from the last 7 days (14 or 30 days, or the wider niche, when there are too few; it says which), each with its opening line, caption, hashtags, views, date and TikTok link, plus counts of the hashtags and opening styles they share. It reads a stored sample that is refreshed weekly: it looks nothing up on TikTok, is not TikTok’s own trending list, and does not predict or promise views.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_tiktok_niche_trends"
  }
}

Input Schema

NameRequiredDescriptionDefault
nicheNoThe niche, sub-niche or topic in plain words, for example skincare, gym, TikTok Shop finds or personal finance. Text.
usernameNoOptional. A public TikTok username, used only when no niche is given and that account was already read in the last 24 hours: the niche is then taken from its captions. Nothing is looked up on TikTok.

Output Schema

NameRequiredDescriptionDefault
linkYesThe matching page on inayaflow.ai.
nicheNoThe niche the request was matched to. level sub_niche = a narrow topic; niche = the whole wider niche.
notesNo
limitsNo
statusYesok, or the plain reason there is no result (not_found, private, no_videos, videos_unavailable, not_enough_videos, invalid_input, unknown_niche, niche_needed, no_data, rate_limited, paused, off, busy, unavailable).
messageYesOne or two plain sentences that say what was found or what went wrong.
patternsNoCounted across the stored posts of the window (up to 60): hashtags used by 2 or more posts, how the opening lines start, and first words that repeat. Counts only, nothing is judged.
top_postsNoThe stored public posts with the most views in the window, highest first, one per creator (up to 5).
window_daysNo7, 14 or 30: how far back the posts go. The shortest window with enough stored posts is used.
window_noteNoWhich window was used and why. Say this to the person.
matched_fromNo
last_collectedNoThe day the newest of these posts was stored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover read-only and closed-world, and the description adds what they cannot: the sample is refreshed weekly and stored, nothing is looked up live, the window widens to 14/30 days or the wider niche when data is thin and reports which, and it does not predict or promise views. These are exactly the data-provenance caveats an agent needs to avoid overclaiming.

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?

Front-loaded with the trigger, then input, then output, then caveats — a clean progression. It is on the long side and the 'not TikTok's own trending list' and 'looks nothing up on TikTok' points overlap, but each section is purposeful.

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

Completeness5/5

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

An output schema exists, yet the description still sketches the record shape and hashtag/style counts well enough for an agent to plan follow-up calls. Provenance, fallback windows and input forms are all covered; nothing material is missing.

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 coverage is already 100%, so the baseline is 3. The description restates the plain-words niche input with examples and repeats the username fallback condition ('only when no niche is given, account read in the last 24 hours'), which is largely duplicative of the schema rather than adding new meaning.

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?

States a specific verb and resource ('trends/working posts in a TikTok niche this week') plus the exact window and ranking basis ('most views from the last 7 days'), and explicitly disclaims being TikTok's own trending list, which separates it from get_tiktok_trending_hashtags and other siblings.

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?

Opens with an explicit trigger ('when someone asks what is trending or working in a TikTok niche this week, or wants ideas'), and gives the niche-less fallback condition for the username parameter. It does not name the sibling tools or state when to prefer them, so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources