Skip to main content
Glama
twittrapi-mcp

twittrapi-mcp

Official

Get users by IDs

users_by_ids
Read-onlyIdempotent

Fetches X profiles for up to 500 numeric user IDs in one request, so you can enrich ID lists without running individual lookups.

Instructions

Get profiles for up to 500 X users in one call, by numeric 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": {
      "ids": "<ids>"
    },
    "name": "users_by_ids"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesNumeric X user IDs, 1 to 500.
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).
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 observedv1.6.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description reinforces the batch ceiling and single-call efficiency but adds nothing about rate limits, authentication, partial failures when some IDs don't resolve, or return shape.

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?

A single tight sentence with the capability and the two binding constraints (batch size, numeric ID) front-loaded. No filler or redundancy.

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 three-parameter read tool with full schema documentation, rich annotations and no output schema, the description covers what an agent needs to decide and call it. The only meaningful omission is failure behavior for invalid or missing IDs, which is modest given the schema detail.

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 ids, format and max_chars are fully documented in the schema, including the simple/raw tradeoff and truncation behavior. The description only restates the numeric-ID and 500-item constraints already present, adding no meaning beyond the schema baseline.

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 gives a specific verb (get), resource (user profiles), a batch scope (up to 500 in one call) and the identifier type (numeric user ID). The batch framing and 'numeric ID' qualifier implicitly separate it from single-user siblings like get_user_by_id and identifier siblings like get_user_by_username, though neither is named.

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?

The batch capability hints at when this is preferred over a single-user fetch, but there is no explicit when-to-use or when-not-to-use statement, and no named alternative such as username_to_id for username-based lookups or get_user_by_id for a single profile.

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