Skip to main content
Glama

SocialDataX X / Twitter MCP

x_get_post_comment_replies_by_comment_id

Read-only

根据 X 帖子 ID 和一级评论 ID 获取公开评论回复列表;用户已提供完整合法的 ID 组合时直接使用;已有 post_id 或帖子链接但缺少必需 ID 时,调用对应一级评论工具补全;缺少帖子定位信息时向用户索取;不要传评论回复结果里的 comment_id 或评论链接。

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": {
      "post_id": "<post_id>",
      "comment_id": "<comment_id>"
    },
    "name": "x_get_post_comment_replies_by_comment_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
post_idYesX 帖子 ID;用户已提供时直接使用,否则请原样复制获取一级评论时使用的 post_id,或评论列表 items[*].post_id;必须是数字字符串;不要传评论 ID、帖子链接、用户名或分享文案。
comment_idYesX 一级评论 ID;用户已提供时直接使用,否则请原样复制 x_get_post_comments_by_post_id 或 x_get_post_comments_by_post_url 返回的 items[*].comment_id;不要传帖子 ID、评论回复结果里的 items[*].comment_id、评论链接、用户主页链接或分享文案。
page_tokenNoX 评论回复列表分页令牌。首次请求留空。继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回;page_token 是不透明分页令牌;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。只能用于同一帖子下同一条一级评论的回复列表;切换 post_id 或 comment_id 时请清空 page_token 后从第一页重新获取。

Output Schema

NameRequiredDescriptionDefault
itemsYes当前页评论回复列表;当前页可能为空,是否可继续翻页以 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. Changed39 schema fields changed
    • changedOutput schema / properties / items / items / properties / author / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "avatar_url": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "头像链接;不可用时为 null。"
      -      },
      -      "bio": {
      -        "description": "用户个人简介;没有或不可用时为空字符串。",
      -        "type": "string"
      -      },
      -      "follower_count": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "粉丝数;不可用时为 null。"
      -      },
      -      "is_verified": {
      -        "anyOf": [
      -          {
      -            "type": "boolean"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "是否显示 X 认证标识;不可用时为 null。"
      -      },
      -      "name": {
      -        "description": "用户展示名;不是 username;不可用时为空字符串。",
      -        "type": "string"
      -      },
      -      "profile_url": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "用户主页链接;不可用时为 null。"
      -      },
      -      "user_id": {
      -        "description": "X 用户稳定数字 ID;不可用时为空字符串。",
      -        "type": "string"
      -      },
      -      "username": {
      -        "description": "X 用户名,不带 @;不可用时为空字符串。",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "user_id",
      -      "username",
      -      "name",
      -      "avatar_url",
      -      "profile_url",
      -      "bio",
      -      "is_verified",
      -      "follower_count"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "avatar_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "头像链接;不可用时为 null。",
      +        "title": "Avatar Url"
      +      },
      +      "bio": {
      +        "description": "用户个人简介;没有或不可用时为空字符串。",
      +        "title": "Bio",
      +        "type": "string"
      +      },
      +      "follower_count": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "粉丝数;不可用时为 null。",
      +        "title": "Follower Count"
      +      },
      +      "is_verified": {
      +        "anyOf": [
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "是否显示 X 认证标识;不可用时为 null。",
      +        "title": "Is Verified"
      +      },
      +      "name": {
      +        "description": "用户展示名;不是 username;不可用时为空字符串。",
      +        "title": "Name",
      +        "type": "string"
      +      },
      +      "profile_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "用户主页链接;不可用时为 null。",
      +        "title": "Profile Url"
      +      },
      +      "user_id": {
      +        "description": "X 用户稳定数字 ID;不可用时为空字符串。",
      +        "title": "User Id",
      +        "type": "string"
      +      },
      +      "username": {
      +        "description": "X 用户名,不带 @;不可用时为空字符串。",
      +        "title": "Username",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "user_id",
      +      "username",
      +      "name",
      +      "avatar_url",
      +      "profile_url",
      +      "bio",
      +      "is_verified",
      +      "follower_count"
      +    ],
      +    "title": "XCommentAuthorData",
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / items / items / properties / bookmark_count / title
      Added value: +"Bookmark Count"
    • addedOutput schema / properties / items / items / properties / comment_id / title
      Added value: +"Comment Id"
    • addedOutput schema / properties / items / items / properties / comment_url / title
      Added value: +"Comment Url"
    • addedOutput schema / properties / items / items / properties / content / title
      Added value: +"Content"
    • addedOutput schema / properties / items / items / properties / external_links / items / properties / short_url / title
      Added value: +"Short Url"
    • addedOutput schema / properties / items / items / properties / external_links / items / properties / target_url / title
      Added value: +"Target Url"
    • addedOutput schema / properties / items / items / properties / external_links / items / title
      Added value: +"XExternalLinkData"
    • addedOutput schema / properties / items / items / properties / external_links / title
      Added value: +"External Links"
    • addedOutput schema / properties / items / items / properties / lang / title
      Added value: +"Lang"
    • addedOutput schema / properties / items / items / properties / like_count / title
      Added value: +"Like Count"
    • addedOutput schema / properties / items / items / properties / media_count / title
      Added value: +"Media Count"
    • addedOutput schema / properties / items / items / properties / media_items / items / properties / cover_image_url / title
      Added value: +"Cover Image Url"
    • addedOutput schema / properties / items / items / properties / media_items / items / properties / duration_ms / title
      Added value: +"Duration Ms"
    • addedOutput schema / properties / items / items / properties / media_items / items / properties / height / title
      Added value: +"Height"
    • addedOutput schema / properties / items / items / properties / media_items / items / properties / media_id / title
      Added value: +"Media Id"
    • addedOutput schema / properties / items / items / properties / media_items / items / properties / media_type / title
      Added value: +"Media Type"
    • addedOutput schema / properties / items / items / properties / media_items / items / properties / video_url / title
      Added value: +"Video Url"
    • addedOutput schema / properties / items / items / properties / media_items / items / properties / width / title
      Added value: +"Width"
    • addedOutput schema / properties / items / items / properties / media_items / items / title
      Added value: +"XMediaItemData"
    • addedOutput schema / properties / items / items / properties / media_items / title
      Added value: +"Media Items"
    • addedOutput schema / properties / items / items / properties / mentioned_users / items / properties / name / title
      Added value: +"Name"
    • addedOutput schema / properties / items / items / properties / mentioned_users / items / properties / user_id / title
      Added value: +"User Id"
    • addedOutput schema / properties / items / items / properties / mentioned_users / items / properties / username / title
      Added value: +"Username"
    • addedOutput schema / properties / items / items / properties / mentioned_users / items / title
      Added value: +"XMentionedUserData"
    • addedOutput schema / properties / items / items / properties / mentioned_users / title
      Added value: +"Mentioned Users"
    • addedOutput schema / properties / items / items / properties / parent_comment_id / title
      Added value: +"Parent Comment Id"
    • 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 / quote_count / title
      Added value: +"Quote Count"
    • addedOutput schema / properties / items / items / properties / repost_count / title
      Added value: +"Repost Count"
    • addedOutput schema / properties / items / items / properties / topic_tags / items / properties / name / title
      Added value: +"Name"
    • addedOutput schema / properties / items / items / properties / topic_tags / items / title
      Added value: +"XTopicTagData"
    • addedOutput schema / properties / items / items / properties / topic_tags / title
      Added value: +"Topic Tags"
    • addedOutput schema / properties / items / items / properties / view_count / title
      Added value: +"View Count"
    • addedOutput schema / properties / items / items / title
      Added value: +"XCommentReplyItemData"
    • 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: +"XPostCommentRepliesResult"
  4. First observed

TDQS

A4.3/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 are public replies only, and the nested comment_ids returned in reply items are not valid inputs — a non-obvious trap. It does not discuss rate limits, cost, or ordering, which keeps it below 5.

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?

A single dense semicolon-delimited sentence that front-loads the core action before the conditional routing rules, so nothing important is buried. It is slightly redundant with the schema's own parameter descriptions, which keeps it from a 5.

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?

With an output schema present and full parameter coverage, the description only needs to carry routing and misuse-prevention, both of which it does. Pagination continuation is left entirely to the schema's page_token description, which is acceptable given its richness.

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% and the schema already documents the provenance of post_id and comment_id, the page_token opacity rules, and the 'do not pass reply comment_id' constraint. The description largely restates those same constraints rather than adding new semantics, so it sits at the baseline for fully documented schemas.

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 pair — fetch the public reply list for a first-level comment, keyed by post ID plus comment ID — and explicitly scopes it to first-level comments, which separates it from x_get_post_comments_by_post_id and from user-reply tools. An agent can identify the exact resource without opening the schema.

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?

Gives explicit branching rules: use directly when a complete valid ID pair exists, backfill the missing ID via the corresponding first-level-comment tool when only post_id or a post link is present, and ask the user when post-locating info is absent. It also adds a negative rule (do not pass the comment_id found inside reply results), covering the most likely misuse path.

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