Skip to main content
Glama
TweetAPI MCP

TweetAPI MCP

Official

Get User By Username

tweetapi_user_by_username
Read-onlyIdempotent

Fetch a public Twitter profile by username, @handle, or profile link to retrieve user details. Use it for single-user lookups; for multiple users, use the batch tool instead.

Instructions

Fetch one public user profile by username, @handle, or profile link. For several users at once, use tweetapi_user_by_usernames. Read-only. Needs a TweetAPI API key and makes one TweetAPI request per call, usually costing 1 unit; each result includes a cost estimate.

Input Schema

NameRequiredDescriptionDefault
usernameYesUsername, @handle, or profile link such as https://x.com/jack.
responseFormatNofull (default) returns TweetAPI's JSON unchanged. compact keeps full post text, IDs, links, original dates, counts, and cursors but drops bulky fields; output.fieldsOmitted lists what was dropped.

Output Schema

NameRequiredDescriptionDefault
costYes
modeYes
toolYes
noticeYes
outputYes
resultYes
endpointYes
usageDocsNo
paginationNoPagination exactly as TweetAPI returned it.
statusCodeYes
retrievedAtYesWhen the MCP server received this response (ISO 8601). Not the post or profile date, and not a promise that X's data was fresh at that moment.
completenessYes
resolvedInputNoIdentifiers the MCP server parsed from links or @handles before calling TweetAPI.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so safety is covered; the description adds genuinely new operational facts — an API key is required, each call is one TweetAPI request costing roughly 1 unit, and the result carries a cost estimate. It stops short of describing failure modes or rate limiting, so it is strong but not exhaustive.

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?

Four short sentences, front-loaded with the purpose before the alternative and cost details, with no filler. The only redundancy is "Read-only," which merely restates readOnlyHint from the annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read tool with full schema coverage, an output schema, and rich annotations, the description covers purpose, the sibling alternative, auth, and cost. Nothing an agent needs in order to call it correctly 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 coverage is 100%, so both parameters are already documented, including the username formats and the full/compact enum behavior with fieldsOmitted. The description only restates the identifier forms and adds no syntax or constraint 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.

Purpose5/5

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

States a specific verb and resource ("Fetch one public user profile") plus the accepted identifier forms, and explicitly names the sibling tweetapi_user_by_usernames as the many-users variant. An agent can distinguish this from user_by_id, user_by_ids and user_by_usernames from the description alone.

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 a concrete routing rule: use this tool for a single user, switch to tweetapi_user_by_usernames for several at once. That is an explicit alternative with the condition that selects it, which is the strongest form of guidance short of listing exclusions.

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