Skip to main content
Glama

x_write

Act on X/Twitter through an account you connect: post a tweet, reply, like, retweet, follow or unfollow, send a DM, delete a tweet, remove a follower, or upload media. Ownership is checked server-side — an agent can only write as a handle its own wallet connected.

Guidance: PREREQUISITE: connect an X account first — POST /api/x-accounts/start (free, SIWX) with {username} only; it returns a one-time connect_url the USER opens in their own browser to sign in there. Never ask the user for their X password, email, or 2FA secret. Poll GET /api/x-accounts until the handle shows linked, then reference it in account. Actions: post (text) | reply (text + reply_to_tweet_id) | like|unlike|retweet|unretweet|delete_tweet (target_tweet_id) | follow|unfollow (target_user_id — the NUMERIC user id, get it from x_read get-user) | remove_follower (target_user_id of the follower) | send_dm (target_user_id + text) | upload_media (media_url → returns media_id). You can only write as a handle THIS wallet connected (checked server-side; the input account is not trusted). Payment settles before the action runs and is non-refundable; a write may return status=pending_confirmation with an actionId to poll — do NOT resend. Idempotency-Key header is required so a retry replays the original result instead of acting twice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNopost|reply|send_dm: the message body.
actionYesWhich write to perform.
accountYesA connected X handle owned by this wallet (no @).
media_idsNosend_dm: optional uploaded media ids to attach.
media_urlNoupload_media: public URL of the file to upload; returns a media_id.
community_idNopost: optional community to post into.
is_note_tweetNopost: long-form note tweet.
target_user_idNofollow|unfollow|send_dm|remove_follower: the numeric X user id of the target (not the @handle). Get it from x_read get-user.
target_tweet_idNolike|unlike|retweet|unretweet|delete_tweet: the target tweet ID.
reply_to_tweet_idNoreply: the tweet being replied to.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does a stellar job: it discloses server-side ownership checks, non-refundable payment before execution, the possibility of pending_confirmation with actionId, and the mandatory Idempotency-Key for safe retries. This is far beyond basic mutation disclosure.

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?

The description is long but exceptionally well-structured: a one-sentence overview, a clear 'Guidance:' section, and a compact action-to-parameter map. Every sentence carries operational weight, and the formatting makes dense information scannable, though it is not 'short'.

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?

Given the tool's complexity (12 actions, 10 params) and no output schema, the description covers prerequisites, auth flow, payment behavior, pending-confirmation handling, idempotency, and parameter relationships. It stops short of describing a full success response for every action, but the essential runtime context is present.

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?

The schema already has 100% parameter coverage, but the description adds valuable semantics: it maps each action to its required parameters, clarifies that target_user_id is the numeric ID (not the @handle) and how to obtain it, and notes the 'no @' convention for account. This elevates it beyond a simple schema repetition.

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?

The description immediately states the tool's purpose with a specific verb and resource: 'Act on X/Twitter through an account you connect' and lists all concrete actions (post, reply, like, retweet, follow, etc.). This clearly distinguishes it from read-only siblings like x_read and x_search.

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?

The description provides explicit prerequisites (connect an X account first), references x_read for obtaining numeric user IDs, and warns against asking for sensitive credentials. It explains when to poll for pending_confirmation and the requirement for an Idempotency-Key, giving clear practical guidance, though it does not explicitly contrast with x_compose or other write siblings.

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.

TDQS

A4.3/5.0
Disambiguation4/5

Most tools have clearly distinct purposes (write, read, search, monitor, compose, etc.), but some overlaps exist: x_read includes trending topics while x_radar is dedicated to trends, and x_timeline provides engagement lists that overlap with x_extract's extractors. Descriptions help differentiate them, but an agent might initially confuse the boundary between x_read, x_search, and x_timeline for tweet retrieval.

Naming Consistency4/5

All tool names share the x_ prefix and are single words, but mix verb forms (read, search, write, compose, extract, monitor) with noun forms (draws, radar, inbox, lists, profile, timeline). The convention is predictable and uniformly lowercase, but a fully consistent verb_noun or noun-only pattern would be clearer. Minor deviation: x_communities vs x_community are nearly identical and refer to reading vs managing.

Tool Count5/5

14 tools is well within the ideal 3-15 range and each tool covers a distinct functional area of X/Twitter: reading, writing, searching, monitoring, extracting, composing, community management, etc. The count feels appropriate for the broad scope of the server, neither bloated nor thin.

Completeness5/5

The tool surface covers the major X/Twitter interactions comprehensively: fully capable read (x_read, x_search, x_timeline), write (x_write, x_profile), community and list operations, real-time monitoring, bulk extraction, direct messaging, media, trends, and even AI-assisted composition and giveaways. Obvious gaps are minimal, such as no list creation/management commands, but the core lifecycle of tweets, users, communities, and accounts is well covered.