Skip to main content
Glama

Get user by ID

get_user_by_id
Read-onlyIdempotent

Get an X user's profile by numeric user ID (rest_id). Same data as get_user_by_username.

Input Schema

NameRequiredDescriptionDefault
formatNoResponse format (default simple). simple: compact JSON with flat camelCase tweets and users, about 60% fewer tokens. raw: X's full GraphQL JSON, only needed for fields simple leaves out (cards, polls, edit history, community notes).
userIdYesNumeric X user ID (rest_id).
max_charsNoMaximum characters of JSON to return (default 50000). Longer output is cut with a [TRUNCATED] marker. Lower it to save context, raise it if you need the full response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already disclose that this is a read-only, idempotent, non-destructive, open-world operation. The description adds useful equivalence context ('Same data as get_user_by_username') but does not discuss rate limits, auth needs, error behavior, or return shape beyond what annotations and schema provide.

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?

Two short sentences, front-loaded with the core action and scoped by lookup key. There is no wasted wording.

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 simple read-only lookup with complete schema descriptions and safety annotations, the definition is largely sufficient. It could say slightly more about the returned profile data, but the low complexity and the named sibling reference keep this from being a serious gap.

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 all three parameters are already documented in the schema. The description only restates that userId is the numeric X user ID and does not add meaning for format or max_chars beyond the schema text.

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: 'Get an X user's profile by numeric user ID (rest_id).' It explicitly distinguishes the lookup key from the sibling get_user_by_username by noting the same data is available there, so an agent can identify the tool's scope without opening schemas.

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?

Names the sibling get_user_by_username and indicates the key distinction: numeric user ID versus username. However, it does not give explicit when-not guidance or mention other related siblings like users_by_ids for bulk lookups or username_to_id for conversion.

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.