Skip to main content
Glama

SocialDataX TikTok MCP

tiktok_search_posts

Read-only

搜索 TikTok 作品,可返回视频和图片作品。用户需要按搜索词查找作品时使用; 已有作品链接时直接使用详情或评论工具;已有 post_id 且需要评论时直接使用按 ID 评论工具,均无需先调用搜索; 从搜索结果继续时,可复用其中的 share_url 或 post_id; 支持 content_type 筛选、过滤用户卡片等非作品结果,并支持 page_token 翻页。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "keyword": "<keyword>"
    },
    "name": "tiktok_search_posts"
  }
}

Input Schema

NameRequiredDescriptionDefault
keywordYes非空搜索词,可传关键词或短语,例如品牌名、话题、人物名或产品名;不要传作品链接、用户主页链接、post_id、tiktok_id 或 page_token。
page_tokenNo请求分页令牌是不透明令牌。请求的 page_token 为空字符串表示首页;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回;不能修改、截断、脱敏、格式化、重组,也不能跨关键词、筛选条件或不同请求链路复用。
content_typeNo作品类型筛选:all 不限作品类型,可返回视频和图片作品;video 只返回视频作品;image 只返回图片作品。继续翻页时必须保持同一 content_type。all

Output Schema

NameRequiredDescriptionDefault
itemsYes当前页 TikTok 作品搜索结果,已过滤用户卡片等非作品结果;当前页可能为空,是否继续翻页以 next_page_token 是否为空为准
pointsYes本次成功调用的积分消耗与账户积分余额。
next_page_tokenYes响应分页令牌是不透明令牌。响应的 next_page_token 为空字符串表示没有更多结果;非空时必须将完整令牌原样作为下一次请求的 page_token 传回;不能修改、截断、脱敏、格式化、重组,也不能跨关键词、筛选条件或不同请求链路复用。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / points / description
      Previous value: -"本次成功调用的积分消耗与调用完成时的账户积分余额。"New value: +"本次成功调用的积分消耗与账户积分余额。"
    • changedOutput schema / properties / points / properties / balance / description
      Previous value: -"本次接口完成时看到的当前积分余额,可为负数。"New value: +"优先返回调用完成时查询到的账户积分余额。查询失败时,回退到本次预扣后的余额快照。余额可为负数。"
  2. Changed2 schema fields changed
    • changedOutput schema / properties / points / properties / balance / description
      Previous value: -"本次接口完成时看到的当前积分余额。"New value: +"本次接口完成时看到的当前积分余额,可为负数。"
    • removedOutput schema / properties / points / properties / balance / minimum
      Removed value: -0
  3. Changed35 schema fields changed
    • addedOutput schema / properties / items / items / properties / author / properties / avatar_url / title
      Added value: +"Avatar Url"
    • addedOutput schema / properties / items / items / properties / author / properties / bio / title
      Added value: +"Bio"
    • addedOutput schema / properties / items / items / properties / author / properties / name / title
      Added value: +"Name"
    • addedOutput schema / properties / items / items / properties / author / properties / profile_url / title
      Added value: +"Profile Url"
    • addedOutput schema / properties / items / items / properties / author / properties / tiktok_id / title
      Added value: +"Tiktok Id"
    • addedOutput schema / properties / items / items / properties / author / properties / user_id / title
      Added value: +"User Id"
    • addedOutput schema / properties / items / items / properties / author / properties / verified / title
      Added value: +"Verified"
    • addedOutput schema / properties / items / items / properties / author / title
      Added value: +"TikTokPostSearchAuthorData"
    • addedOutput schema / properties / items / items / properties / collect_count / title
      Added value: +"Collect Count"
    • addedOutput schema / properties / items / items / properties / comment_count / title
      Added value: +"Comment Count"
    • addedOutput schema / properties / items / items / properties / content_type / title
      Added value: +"Content Type"
    • addedOutput schema / properties / items / items / properties / cover_image_url / title
      Added value: +"Cover Image Url"
    • addedOutput schema / properties / items / items / properties / description / title
      Added value: +"Description"
    • addedOutput schema / properties / items / items / properties / images / items / properties / height / title
      Added value: +"Height"
    • addedOutput schema / properties / items / items / properties / images / items / properties / url / title
      Added value: +"Url"
    • addedOutput schema / properties / items / items / properties / images / items / properties / width / title
      Added value: +"Width"
    • addedOutput schema / properties / items / items / properties / images / items / title
      Added value: +"TikTokPostSearchImageData"
    • addedOutput schema / properties / items / items / properties / images / title
      Added value: +"Images"
    • addedOutput schema / properties / items / items / properties / like_count / title
      Added value: +"Like Count"
    • changedOutput schema / properties / items / items / properties / music / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "author": {
      -        "description": "音乐作者;当前不可用时为空字符串",
      -        "type": "string"
      -      },
      -      "duration_ms": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "音乐时长,毫秒;当前不可用时为 null"
      -      },
      -      "music_id": {
      -        "description": "音乐 ID;长数字字符串,原样保留,不要转为数字;当前仅作为作品音乐标识返回",
      -        "type": "string"
      -      },
      -      "play_url": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "音乐播放资源链接;可能随时间失效;当前不可用时为 null;不要把 play_url 当作音乐 ID 使用"
      -      },
      -      "title": {
      -        "description": "音乐标题;当前不可用时为空字符串",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "music_id",
      -      "title",
      -      "author",
      -      "play_url",
      -      "duration_ms"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "author": {
      +        "description": "音乐作者;当前不可用时为空字符串",
      +        "title": "Author",
      +        "type": "string"
      +      },
      +      "duration_ms": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "音乐时长,毫秒;当前不可用时为 null",
      +        "title": "Duration Ms"
      +      },
      +      "music_id": {
      +        "description": "音乐 ID;长数字字符串,原样保留,不要转为数字;当前仅作为作品音乐标识返回",
      +        "title": "Music Id",
      +        "type": "string"
      +      },
      +      "play_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "音乐播放资源链接;可能随时间失效;当前不可用时为 null;不要把 play_url 当作音乐 ID 使用",
      +        "title": "Play Url"
      +      },
      +      "title": {
      +        "description": "音乐标题;当前不可用时为空字符串",
      +        "title": "Title",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "music_id",
      +      "title",
      +      "author",
      +      "play_url",
      +      "duration_ms"
      +    ],
      +    "title": "TikTokPostSearchMusicData",
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / items / items / properties / play_count / title
      Added value: +"Play Count"
    • addedOutput schema / properties / items / items / properties / post_id / title
      Added value: +"Post Id"
    • addedOutput schema / properties / items / items / properties / publish_time / title
      Added value: +"Publish Time"
    • addedOutput schema / properties / items / items / properties / share_count / title
      Added value: +"Share Count"
    • addedOutput schema / properties / items / items / properties / share_url / title
      Added value: +"Share Url"
    • addedOutput schema / properties / items / items / properties / title / title
      Added value: +"Title"
    • addedOutput schema / properties / items / items / properties / topic_tags / items / properties / name / title
      Added value: +"Name"
    • addedOutput schema / properties / items / items / properties / topic_tags / items / properties / topic_id / title
      Added value: +"Topic Id"
    • addedOutput schema / properties / items / items / properties / topic_tags / items / title
      Added value: +"TikTokTopicTagData"
    • addedOutput schema / properties / items / items / properties / topic_tags / title
      Added value: +"Topic Tags"
    • changedOutput schema / properties / items / items / properties / video / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "duration_ms": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "视频时长,毫秒;当前不可用时为 null"
      -      },
      -      "height": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "视频高度,像素;当前不可用时为 null"
      -      },
      -      "play_url": {
      -        "description": "视频播放资源链接;不是作品页面链接;可能随时间失效;如果不可用,外层 video 为 null",
      -        "type": "string"
      -      },
      -      "width": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "视频宽度,像素;当前不可用时为 null"
      -      }
      -    },
      -    "required": [
      -      "play_url",
      -      "duration_ms",
      -      "width",
      -      "height"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "duration_ms": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "视频时长,毫秒;当前不可用时为 null",
      +        "title": "Duration Ms"
      +      },
      +      "height": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "视频高度,像素;当前不可用时为 null",
      +        "title": "Height"
      +      },
      +      "play_url": {
      +        "description": "视频播放资源链接;不是作品页面链接;可能随时间失效;如果不可用,外层 video 为 null",
      +        "title": "Play Url",
      +        "type": "string"
      +      },
      +      "width": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "视频宽度,像素;当前不可用时为 null",
      +        "title": "Width"
      +      }
      +    },
      +    "required": [
      +      "play_url",
      +      "duration_ms",
      +      "width",
      +      "height"
      +    ],
      +    "title": "TikTokPostSearchVideoData",
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / items / items / title
      Added value: +"TikTokPostSearchItemData"
    • addedOutput schema / properties / items / title
      Added value: +"Items"
    • addedOutput schema / properties / next_page_token / title
      Added value: +"Next Page Token"
    • addedOutput schema / title
      Added value: +"TikTokPostSearchResult"
  4. Changed5 schema fields changed
    • changedInput schema / properties / keyword / description
      Previous value: -"搜索词,可传关键词或短语,例如品牌名、话题、人物名或产品名;不要传作品链接、用户主页链接、post_id、tiktok_id 或 page_token。"New value: +"非空搜索词,可传关键词或短语,例如品牌名、话题、人物名或产品名;不要传作品链接、用户主页链接、post_id、tiktok_id 或 page_token。"
    • addedInput schema / properties / keyword / minLength
      Added value: +1
    • addedInput schema / properties / keyword / pattern
      Added value: +".*\\S.*"
    • changedInput schema / properties / page_token / description
      Previous value: -"分页令牌。首页传空字符串;next_page_token 为空字符串表示没有更多结果。继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回;它是不透明令牌,不能修改、截断、脱敏、格式化、重组,也不能跨关键词、筛选条件或不同请求链路复用。"New value: +"请求分页令牌是不透明令牌。请求的 page_token 为空字符串表示首页;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回;不能修改、截断、脱敏、格式化、重组,也不能跨关键词、筛选条件或不同请求链路复用。"
    • changedOutput schema / properties / next_page_token / description
      Previous value: -"分页令牌。首页传空字符串;next_page_token 为空字符串表示没有更多结果。继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回;它是不透明令牌,不能修改、截断、脱敏、格式化、重组,也不能跨关键词、筛选条件或不同请求链路复用。"New value: +"响应分页令牌是不透明令牌。响应的 next_page_token 为空字符串表示没有更多结果;非空时必须将完整令牌原样作为下一次请求的 page_token 传回;不能修改、截断、脱敏、格式化、重组,也不能跨关键词、筛选条件或不同请求链路复用。"
  5. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds real behavioral context beyond that: results can include both video and image posts, non-post results such as user cards are filtered out, and page_token drives pagination. It stops short of discussing result volume, rate limits, or auth, which keeps it out of the top band.

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 routing rules are front-loaded and the semicolon-delimited clauses each carry distinct information. A few clauses (content_type filtering, pagination) duplicate what the schema already states, which is mild waste but not enough to obscure the message.

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?

With an output schema present, the description needn't explain return values, and it covers the remaining gaps: when to search versus use siblings, how to chain from results, how filtering and paging behave. Nothing an agent needs in order to call this correctly 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 description coverage is 100%, so keyword, page_token, and content_type are already fully documented, including the enum values and the opaque-token rules. The description restates content_type filtering and page_token paging without adding syntax or constraints the schema lacks, so the baseline of 3 applies.

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 opens with a specific verb and resource ("搜索 TikTok 作品") and immediately scopes the result set ("可返回视频和图片作品"). It distinguishes itself from the detail/comment siblings by naming them, so an agent can route without inspecting schemas.

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

Usage Guidelines5/5

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

Explicit when-to-use ("用户需要按搜索词查找作品时使用") and explicit when-not-to-use with the alternatives named: existing post URL goes to the detail/comment tools, an existing post_id with a comment need goes to the by-ID comment tool. It also explains how to continue from a prior search via share_url or post_id, which is exactly the multi-step routing an agent needs.

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