Skip to main content
Glama

SocialDataX X / Twitter MCP

x_get_user_info_by_user_id

Read-only

根据 X 用户 ID 获取公开用户信息;已有完整 user_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": {
      "user_id": "<user_id>"
    },
    "name": "x_get_user_info_by_user_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_idYesX 用户稳定数字 ID;用户已提供时原样使用;必须是数字字符串。可从用户搜索结果的非空 items[*].user_id、用户详情的非空 user_id,或帖子及评论结果的非空作者字段 author.user_id 原样复制;不要传用户名、用户主页链接、帖子链接或分享文案。

Output Schema

NameRequiredDescriptionDefault
bioYes用户个人简介;没有或不可用时为空字符串。
nameYes用户展示名;不是 username;不可用时为空字符串。
pointsYes本次成功调用的积分消耗与账户积分余额。
user_idYesX 用户稳定数字 ID;不可用时为空字符串。
locationYes用户主页资料里填写的所在地;不是 IP 属地;不可用时为空字符串。
usernameYesX 用户名,不带 @;不可用时为空字符串。
avatar_urlYes头像链接;不可用时为 null。
is_privateYes是否私密/受保护账号;不可用时为 null。
post_countYes累计发帖数;不可用时为 null。
is_verifiedYes是否显示 X 认证标识;不可用时为 null。
profile_urlYes用户主页链接;不可用时为 null。
external_urlYes用户主页填写的网站或外部链接;不是用户主页链接;标准用户主页请使用 profile_url;不可用时为 null。
verified_typeYes认证类型补充文本;不用于判断是否认证,应以 is_verified 为准;没有或不可用时为 null。
follower_countYes粉丝数;不可用时为 null。
following_countYes关注数;不可用时为 null。
pinned_post_idsYes置顶帖子 ID 列表;可用于 x_get_post_detail_by_post_id;没有或不可用时为空数组。
header_image_urlYes用户主页头图链接;不可用时为 null。
media_post_countYes累计媒体帖数;不可用时为 null。
account_created_timeYes账号创建时间,秒级 Unix 时间戳;不可用时为 null。
affiliated_account_countYes该账号关联的账号数量;不可用时为 null。

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. Changed20 schema fields changed
    • addedOutput schema / properties / account_created_time / title
      Added value: +"Account Created Time"
    • addedOutput schema / properties / affiliated_account_count / title
      Added value: +"Affiliated Account Count"
    • addedOutput schema / properties / avatar_url / title
      Added value: +"Avatar Url"
    • addedOutput schema / properties / bio / title
      Added value: +"Bio"
    • addedOutput schema / properties / external_url / title
      Added value: +"External Url"
    • addedOutput schema / properties / follower_count / title
      Added value: +"Follower Count"
    • addedOutput schema / properties / following_count / title
      Added value: +"Following Count"
    • addedOutput schema / properties / header_image_url / title
      Added value: +"Header Image Url"
    • addedOutput schema / properties / is_private / title
      Added value: +"Is Private"
    • addedOutput schema / properties / is_verified / title
      Added value: +"Is Verified"
    • addedOutput schema / properties / location / title
      Added value: +"Location"
    • addedOutput schema / properties / media_post_count / title
      Added value: +"Media Post Count"
    • addedOutput schema / properties / name / title
      Added value: +"Name"
    • addedOutput schema / properties / pinned_post_ids / title
      Added value: +"Pinned Post Ids"
    • addedOutput schema / properties / post_count / title
      Added value: +"Post Count"
    • addedOutput schema / properties / profile_url / title
      Added value: +"Profile Url"
    • addedOutput schema / properties / user_id / title
      Added value: +"User Id"
    • addedOutput schema / properties / username / title
      Added value: +"Username"
    • addedOutput schema / properties / verified_type / title
      Added value: +"Verified Type"
    • addedOutput schema / title
      Added value: +"XUserInfoData"
  4. Changed2 schema fields changed
    • changedInput schema / properties / user_id / description
      Previous value: -"X 用户稳定数字 ID;用户已提供时原样使用,否则可从搜索、详情、评论或评论回复结果的非空 author.user_id、用户帖子列表结果的非空 author.user_id,或用户信息结果的非空 user_id 原样复制;必须是数字字符串;不要传用户名、用户主页链接、帖子链接或分享文案。"New value: +"X 用户稳定数字 ID;用户已提供时原样使用;必须是数字字符串。可从用户搜索结果的非空 items[*].user_id、用户详情的非空 user_id,或帖子及评论结果的非空作者字段 author.user_id 原样复制;不要传用户名、用户主页链接、帖子链接或分享文案。"
    • changedOutput schema / required
      Previous value: -[
      -  "user_id",
      -  "username",
      -  "name",
      -  "avatar_url",
      -  "profile_url",
      -  "bio",
      -  "external_url",
      -  "is_verified",
      -  "verified_type",
      -  "is_private",
      -  "affiliated_account_count",
      -  "follower_count",
      -  "following_count",
      -  "post_count",
      -  "media_post_count",
      -  "location",
      -  "header_image_url",
      -  "pinned_post_ids",
      -  "account_created_time",
      -  "points"
      -]New value: +[
      +  "user_id",
      +  "username",
      +  "name",
      +  "avatar_url",
      +  "profile_url",
      +  "bio",
      +  "external_url",
      +  "is_verified",
      +  "verified_type",
      +  "is_private",
      +  "follower_count",
      +  "following_count",
      +  "post_count",
      +  "media_post_count",
      +  "location",
      +  "header_image_url",
      +  "pinned_post_ids",
      +  "account_created_time",
      +  "affiliated_account_count",
      +  "points"
      +]
  5. First observed

TDQS

A3.5/5.0
Behavior3/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 only that the returned data is limited to public profile information, and says nothing about rate limits, auth requirements, or failure behavior for suspended/protected accounts.

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?

Two short clauses with the resource stated first and the conditional usage cue second; nothing is wasted. It is terse to the point of omitting the sibling routing that would make it more actionable, but the length itself is appropriate.

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 a single fully documented required parameter, an output schema, and annotations covering safety, the description only needs to establish what is fetched and which identifier form to supply — both are present. Only the explicit alternative-tool routing 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%, and the schema already spells out that user_id must be a numeric string copied verbatim from search results, user detail, or author fields. The description's "已有完整 user_id 时直接使用" reinforces the pass-through intent but adds no format or sourcing detail beyond the schema, so the baseline 3 applies.

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

Purpose4/5

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

The description names a specific verb and resource (获取公开用户信息) and pins the lookup key to X user ID, which implicitly separates it from the username and profile_url siblings. It stops short of naming those siblings explicitly, so the differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

"已有完整 user_id 时直接使用" gives a conditional cue that this is the path to take when a numeric ID is already in hand, which implies the alternative ID-resolution tools should be used otherwise. However, it never names x_get_user_info_by_username or x_get_user_info_by_profile_url as the fallbacks, leaving the routing decision implied.

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