Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TWS_PROXYNotwscrape's own proxy env (lower priority)
SPECTRE_DBNoAccount pool SQLite path~/.twscrape/spectre.db
SPECTRE_PROXYNoGlobal proxy (e.g., socks5://user:pass@host:port)
TWS_HTTP_BACKENDNoSet to `curl` for TLS fingerprintinghttpx

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Spectre gives you X/Twitter: search, timelines, profiles, posting, media, DMs, lists, bookmarks, notifications, scheduled posts and account management.

Start with get_me() to confirm which account is live, then search()/get_user(). Ids are strings or x.com URLs. Read tools are cheap; write tools are public and permanent, so confirm intent with the user first. Errors carry kind: rate_limit (wait or switch account), auth (re-add cookies), permission (X Premium / privacy), validation (fix the input), not_found.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_meA

Identify the account this server is actually authenticated as.

Call this first in any session. Returns the live handle, id, bio and counts straight from X — not from the local pool — plus whether the stored pool handle has gone stale (accounts get renamed; a stale handle makes every profile lookup on it return "not found").

list_accountsA

List the accounts in the pool with their state (active / locked / error).

Use before heavy work to see how much rate-limit headroom the pool has, and when a call fails with kind: auth to spot the dead account.

pool_statusA

Account pool health: counts plus per-account state.

Faster to read than list_accounts when all you need is "do I have a working account right now".

set_active_accountA

Make one account the first choice for every call.

The pool still falls back to the others on a rate limit unless auto-rotation is off. Use when a specific account must own the action (posting as a brand, DMs from a personal handle).

set_auto_rotateA

Turn automatic account rotation on or off.

On (default): a rate-limited or dead account is benched and the next active account retries the call. Off: the call fails instead, so you always know which account acted.

remove_accountA

Remove an account and its cookies from the local pool.

Destructive: the cookies are gone, so re-adding requires fresh browser cookies. Does not touch the X account itself.

get_rate_limitsA

Per-account rate-limit state: locks, last use, last X rate-limit headers.

Call before a bulk job to decide how many accounts can absorb it, and after a kind: rate_limit error to see when the window resets.

searchA

Search X posts with the full operator language.

Supports from:, since:/until:, #tag, filter:media, filter:links, lang:, min_retweets:, min_faves:, -"term", OR, quoted_tweet_id:. Use mode="latest" for recency, "top" for relevance, "media" for visual posts only. Costs one request per ~20 results — the expensive call in bulk workflows.

search_usersA

Find accounts by name or keyword.

Cheaper than search() when you only need the handle/id. Follow up with get_user() for the full profile.

get_userA

Full profile for one handle (without the @).

Returns the numeric id you need for follow/block/DM/like-style tools. Also the right call to check whether an account still exists before acting on it.

get_user_by_idA

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.

get_users_by_idsA

Resolve many user ids at once (comma-separated).

One call per id internally, so keep it to a handful; missing ids come back in missing rather than failing the batch.

get_user_tweetsA

A user's own posts, newest first (no replies).

X caps how far back this reaches (~3,200 posts). For older material use search("from: since:...").

get_user_tweets_and_repliesB

A user's posts including their replies.

Use to see who someone talks to and how — good for tone/relationship analysis. Costs more than get_user_tweets because replies dilute the page.

get_user_mediaB

Photos, videos and GIFs a user posted, with direct media URLs.

Use before download_media() when you need the files, or for visual research.

get_followersA

A user's followers, with a real limit.

limit is honoured exactly (the old 100 cap is gone) up to 5000; long walks stop at a time budget and set truncated: true. total_available is the account's follower count so you can see how far you got.

get_followingA

Accounts a user follows, with a real limit (up to 5000).

Same truncation contract as get_followers: truncated tells you the walk stopped early, total_available is the profile's following count.

get_verified_followersB

Blue-verified followers of a user.

A cheap proxy for "who matters in this audience" — useful for prioritising outreach without walking thousands of followers.

get_followers_you_knowB

Mutual followers between you and another account.

Best first move before cold outreach: the overlap is the warm-intro list.

get_user_likesB

Posts a user liked.

Usually empty: X hides likes for most accounts.

get_user_highlightsC

Posts a user pinned to their profile Highlights section.

Highlights are curated, so this is the closest thing to "what they want to be known for".

create_highlightA

Add posts to your profile's Highlights section (comma-separated ids).

Highlights are public. X limits the feature to eligible accounts and answers kind: permission for the rest.

delete_highlightC

Remove a post from your profile's Highlights section.

get_tweetA

One post with full text, metrics, media URLs and author.

Long-form posts are returned in full (the note_tweet body), not truncated at 280 characters. Use get_tweets() to batch several ids.

get_tweetsA

Fetch several posts by id in one call (comma-separated).

Cheaper than looping get_tweet. Missing ids are reported in missing instead of failing the whole batch.

get_tweet_repliesA

Direct replies to a post.

Use get_thread() instead when you need the whole conversation including the parent chain.

get_threadB

The conversation a post belongs to, oldest first.

Pass any id in the thread. Includes the focal post, its ancestors and the replies X returns for that conversation.

get_tweet_quotesB

Posts that quote a given post.

Quotes are where the commentary lives — more useful than replies for judging reaction. Paginate with next_cursor.

get_retweetersC

Accounts that retweeted a post.

get_favoritersB

Accounts that liked a post.

Can be empty on very large accounts: X limits who is listable.

get_tweet_edit_historyA

Edit history of a post (ids of every version).

Only populated for posts that were actually edited.

get_similar_postsB

Posts X considers related to a given post.

Premium-gated upstream: on non-Premium accounts this returns an empty list with a note, not an error.

get_community_notesC

Community Notes attached to a post.

rate_community_noteB

Rate a Community Note: helpful, somewhat_helpful, or not_helpful.

Requires an account enrolled in Community Notes.

get_home_timelineA

The authenticated account's "For You" feed, with authors resolved.

Use for ambient awareness rather than targeted research. For the reverse chronological feed use search("filter:follows").

get_notificationsB

Notifications timeline: likes, follows, replies, mentions, reposts.

Use it to find what needs a response; each item carries the type plus the user/tweet involved. Paginate with next_cursor.

post_tweetA

Publish a post, reply or quote. Public the moment it runs.

Confirm with the user first. Upload media before posting and pass the ids here (comma-separated). Standard accounts cap at 280 characters, Premium at 25,000; X rejects identical text as a duplicate.

delete_tweetA

Delete one of your posts. Permanent — confirm first.

upload_mediaA

Upload an image, GIF or video and get the media id for post_tweet.

Cookie auth, no API keys. Chunked (4 MiB) with processing polling for video, so large files take a while but do not time out. jpg/png/webp/gif/mp4/mov.

download_mediaB

Download a post's media (or a single media URL) to disk.

Pass a tweet id/URL to get everything attached, or a direct pbs/video URL. Returns the saved paths so you can open or analyse them.

like_tweetB

Like a post. Reversible with unlike_tweet.

unlike_tweetC

Remove your like from a post.

retweetA

Repost someone's post to your followers. Public — confirm first.

unretweetC

Undo your repost.

bookmark_tweetA

Save a post to your bookmarks. Private, reversible.

unbookmark_tweetB

Remove a post from your bookmarks.

pin_tweetB

Pin a post to your profile. Replaces any existing pin without warning.

unpin_tweetC

Unpin the post from your profile.

pin_replyB

Pin a reply inside its conversation (needs the conversation id).

The conversation id is a tweet's conversation_id; get it from get_tweet.

unpin_replyC

Unpin a reply from its conversation.

follow_userB

Follow an account. Takes a numeric user id — resolve handles with get_user first.

unfollow_userC

Unfollow an account.

mute_userA

Mute an account (you stop seeing them; they are not told).

unmute_userC

Unmute an account.

block_userB

Block an account. They lose access to you; this is visible to them.

unblock_userC

Unblock an account.

remove_followerB

Remove someone from your followers (soft-block). They can follow again.

get_muted_accountsC

Accounts you have muted.

get_blocked_accountsC

Accounts you have blocked.

send_dmA

Send a direct message. No recall — confirm the recipient and text first.

The recipient must accept DMs from you (mutual follow, or open message requests). Failures come back as kind: validation with X's reason.

get_dm_inboxA

Recent DM conversations and their latest messages.

Returns both messages (flat, newest first) and conversations (threads with participants). Use a conversation_id from here with get_dm_conversation.

get_dm_conversationA

Every message in one DM thread, oldest first.

Includes both directions and the participants' profiles. If a reply the user can see on x.com is missing here, X is not serving it to the cookie session — report that instead of assuming it does not exist.

search_dmC

Search across all DM messages.

search_dm_groupsC

Search group DM conversations.

search_dm_peopleC

Search for people you have DM history with.

get_dm_mutedD

Muted DM conversations.

dm_block_userA

Block a user from sending you DMs (does not block them globally).

dm_unblock_userC

Allow a user to DM you again.

get_list_infoC

Name, description, member/subscriber counts and owner of a list.

create_listC

Create a list. Returns the list_id you need for members and timelines.

update_listC

Rename or re-describe a list.

delete_listB

Delete a list permanently. Members are not affected.

add_list_memberC

Add an account to a list.

remove_list_memberB

Remove an account from a list.

get_list_timelineC

Posts from the members of a list (the main reason to build lists).

get_list_membersD

Members of a list.

get_list_subscribersD

Accounts subscribed to a list.

get_list_membershipsC

Lists a user belongs to — a fast map of someone's information diet.

get_list_ownershipsC

Lists a user created.

subscribe_listB

Subscribe to someone else's list so it appears in your timeline.

unsubscribe_listC

Unsubscribe from a list.

get_community_infoC

Community name, description, member count and join policy.

get_community_tweetsC

Posts inside a community.

join_communityC

Join a community. Visible to its members.

leave_communityD

Leave a community.

get_topic_infoC

Details and follow state of a topic.

follow_topicC

Follow a topic (X's curated interest feeds).

unfollow_topicC

Unfollow a topic.

get_trendsA

Trending topics for a place (woeid 1 = worldwide).

Find a woeid with get_trend_locations. Tweet volumes are present only for trends X decides to publish them for.

get_trend_locationsA

Places you can request trends for, with their woeids.

get_bookmarksB

Your bookmarked posts, newest first. Paginate with next_cursor.

search_bookmarksC

Full-text search inside your bookmarks.

clear_all_bookmarksA

Delete every bookmark. Irreversible — confirm first.

get_bookmark_foldersA

List your bookmark folders.

X gates bookmark folders behind Premium.

create_bookmark_folderB

Create a bookmark folder (Premium-gated by X).

edit_bookmark_folderC

Rename a bookmark folder (Premium-gated by X).

delete_bookmark_folderA

Delete a bookmark folder. The bookmarks inside are not deleted.

add_tweet_to_folderC

Put a bookmarked post into a folder.

remove_tweet_from_folderB

Remove a post from a folder (keeps the bookmark itself).

get_bookmark_folder_timelineC

Posts inside one bookmark folder.

schedule_tweetA

Schedule a post for a future ISO-8601 time (e.g. 2026-12-01T12:00:00Z).

Posting happens later without you — clear it with the user, and note the time is UTC unless the string carries an offset.

get_scheduled_tweetsB

Everything currently queued, with execute_at in ISO-8601 and state.

edit_scheduled_tweetC

Change the text or time of a queued post.

delete_scheduled_tweetC

Cancel a queued post.

create_draftB

Save a draft (never publishes by itself).

get_draftsC

Your saved drafts.

edit_draftC

Rewrite a saved draft.

delete_draftB

Delete a saved draft.

get_account_settingsA

The authenticated account as X sees it, plus a stale-handle warning.

X removed the REST settings endpoint, so language/timezone are no longer exposed; everything here comes from GraphQL Viewer.

update_profileA

Change your public display name, bio, location or website.

Only the fields you pass are touched (empty means "leave it"). Bio cannot contain < > or & — X rejects them with code 120.

update_profile_imageB

Replace the avatar. Takes a local jpg/png/gif path.

update_profile_bannerC

Replace the banner/header image (recommended 1500x500).

delete_profile_bannerB

Remove the banner image.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

C2.8/5.0

Scored across 113 tools

Disambiguation4/5

Most tools target clearly distinct resource-action pairs, and the descriptions do a good job separating similar reads such as get_tweet_replies vs get_thread or get_user_tweets vs get_user_tweets_and_replies. However, the account/session cluster (get_me, get_account_settings, list_accounts, pool_status, get_rate_limits) overlaps enough that an agent must rely heavily on nuance in descriptions.

Naming Consistency4/5

The surface is overwhelmingly snake_case verb_noun and is easy to scan. There are notable deviations such as search (instead of search_tweets), pool_status, get_me, retweet/unretweet, and dm_block_user, but the overall convention remains predictable.

Tool Count1/5

At 113 tools, the surface is far beyond a well-scoped set and becomes an extreme selection burden. Many tools are legitimate X operations, but the sheer number of paired actions and specialized read variants makes the server unwieldy.

Completeness4/5

Coverage is very broad: authentication/account handling, search, users, tweets, timelines, posting, media, engagement, DMs, lists, communities, trends, bookmarks, scheduling, drafts, and profile management are all represented. Minor gaps remain around tweet editing, polls/Spaces, and some group DM or community management operations, but core workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues