Skip to main content
Glama

get_user_by_id

Resolve a numeric user ID to the matching X/Twitter profile and handle when an ID arrives from a DM, list, or tweet author_id.

Instructions

Resolve a numeric user id to a profile.

Use when an id arrives from a DM, list membership or a tweet's author_id and you need the handle. Cheaper and more reliable than guessing a handle.

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": "get_user_by_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.6

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It adds useful relative-cost context ("cheaper and more reliable than guessing a handle"), which is real value beyond structured fields, but says nothing about failure behavior for unknown/suspended ids, auth requirements, or rate limits.

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

Conciseness5/5

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

Three short sentences, front-loaded with the verb+resource, then the trigger conditions, then a comparative justification. Nothing is repeated and nothing is padding.

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?

For a single-parameter read tool with an output schema covering the return value, the description covers purpose, invocation context, and input format. The remaining gap is error/edge-case behavior, which is minor given the tool's simplicity.

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

Parameters4/5

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

Schema coverage is 0% — user_id is typed only as a string with no description. The description compensates by specifying that the id is numeric and by naming the sources such ids come from (DM, list membership, author_id), which meaningfully constrains what to pass.

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?

States a specific verb and resource: "Resolve a numeric user id to a profile," which tells an agent exactly the input (id) and output (profile). It implies a distinction from handle-based lookups ("than guessing a handle") but never names the batch sibling get_users_by_ids, so the boundary against that tool is left to inference.

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?

Gives concrete triggering conditions: an id arrives from a DM, list membership, or a tweet's author_id and you need the handle. That is clear when-to-use guidance for the primary case. It stops short of explicit when-not guidance or naming the batch alternative for multiple ids.

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

Deploy Server

Other Tools