Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENAI_API_KEYNoOptional. Only needed for server-side text generation (auto replies, composite draft tools, background automation). Interactive MCP use is keyless because the calling agent writes the text.
OPENAI_BASE_URLNoOptional. OpenAI-compatible endpoint, for example https://openrouter.ai/api/v1 or http://localhost:11434/v1 for Ollama. Defaults to api.openai.com.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_accountsA

List configured accounts with secrets stripped (no cookies, no passwords, proxy credentials masked). Read-only — never starts a browser.

get_metrics

Read recorded metrics for an account (counters + recent events). Read-only — never starts a browser.

search_tweets

Search recent X posts for a query string. Read-only (draft mode does not apply). Reuses the account's warm browser session. account defaults to the first active configured account. include_images=true additionally attaches the first photo of up to 5 tweets as image content (bounded); the per-tweet media URLs + alt text are always present.

search_profile

Read recent posts from ONE X profile. profile takes a handle ("@nasa" or "nasa"), a profile URL, or a tweet URL (which resolves to its author). Read-only (draft mode does not apply — nothing is posted), but it reuses the account's browser session. account defaults to the first active configured account. Use this to watch specific people and competitors, and to re-read one of your own published posts for its public counts; use search_tweets for topic and keyword discovery. Profile timelines include pinned posts and reposts, so check user_handle before treating a result as the profile owner's own writing. include_images=true additionally attaches the first photo of up to 5 posts as image content (bounded); the per-post media URLs + alt text are always present.

get_tweet

Read-only fetch of one tweet: text, author, public counts, typed media (photos + video posters) and the account's persona. With include_images=true (default) photos also attach as image content so a vision-capable client sees them; the envelope always carries URLs

  • alt text as the fallback. Nothing is posted; draft mode N/A.

approve_draft

Execute a pending draft created by a write tool. Runs the exact same execution path as direct mode (pacing, dedup, metrics). A draft can be approved exactly once; unknown or consumed ids return an error.

post_tweet

Post a tweet from an account. media = local file paths; community = target community id. In draft mode (default) returns a draft for review and posts nothing; approve_draft(draft_id) executes it.

generate_and_post

Generate a post about topic with the configured LLM and post it. In draft mode (default) the generated text is stored in the draft's payload/preview so a human reviews the actual content before anything is posted.

reply_to_tweet

Reply to a tweet. Pass explicit text, or "auto" to generate the reply with the LLM from the tweet's actual content (a read-only fetch is performed so the draft shows the real reply text). In draft mode (default) nothing is posted until approve_draft(draft_id).

prepare_reply

Read-only reply context: the tweet's text AND media (photos attach as image content so your model can see them), plus the account's keywords and persona — YOUR model writes the reply itself, no server-side LLM, nothing posted. Then pass your text to reply_to_tweet(text=...) or queue_engagement(action="reply", text=...).

run_cycleA

Run the legacy batch automation cycle in the background and return a run handle immediately (progress goes to the logs — this never silent-blocks). account limits the run to one account; pipelines is a comma-separated subset of: competitor_reposts, keyword_replies, keyword_retweets, likes, content_curation, community_engagement (mapped onto the account's ActionConfig enable flags for this run only — config files are never mutated; same names as the CLI's x-use run --pipeline). Draft mode does not apply to batch cycles.

engageA

Engage with tweets found via keyword search. actions is a subset of ["like", "retweet"] (default ["like"]); every candidate passes the analyzer relevance gate; max_actions is hard-capped by the account's per-run config caps. In draft mode (default) each planned action becomes an individually approvable draft and nothing executes.

queue_postA

Schedule a post for paced execution. Pass text verbatim, or a topic to generate the text NOW with the configured LLM (the stored payload is final — list_queue shows exactly what will be posted). not_before is an optional ISO 8601 timestamp. Nothing executes until process_queue is called (or auto_drain, if enabled).

queue_engagementA

Queue a like, retweet, or reply for paced execution. action is one of like/retweet/reply. reply requires text ("auto" scrapes the tweet and generates the reply NOW, so the stored payload is final). Nothing executes until process_queue is called.

list_queue

List queued actions with their full payloads (exactly what will fire), plus per-status counts. Read-only — never starts a browser.

cancel_queued_action

Cancel a pending or failed queued action. Done, processing, and already-cancelled items cannot transition.

process_queueA

Drain queued actions with jittered pacing and daily caps. THIS CALL IS THE APPROVAL GATE for queued work: items execute through the same pacing/dedup/metrics path as every other write action. With account omitted, every account with due items drains (each bounded by max_actions and its own daily caps).

get_accountA

Show one account's masked config (no cookies, no password, proxy credentials masked) plus cookie-file status. Read-only — never starts a browser.

add_accountA

Add an account to config/accounts.json (validated, backed up, atomic). cookie_file is a path ON THIS MACHINE to an exported x.com cookies JSON; it is validated and copied to config/_cookies.json. Cookie values never pass through the tool call. persona is freeform markdown describing the account's voice/engagement style (max 4000 chars).

update_accountA

Partially update an account. Only provided fields change (None = leave unchanged); pass an empty string to clear proxy. persona sets the freeform persona text; pass an empty string to clear it. cookie_file re-imports cookies like add_account. The account's warm browser session is closed, so the next action cold-starts on the new config.

set_account_activeB

Enable or pause an account without deleting it. Pausing closes its warm browser session.

remove_accountA

Remove an account from config/accounts.json. Requires confirm=true. Closes the account's warm session. The backup written during the mutation (config/backups/) is the recovery path; the cookie file is left on disk.

list_draftsA

List drafts, newest first. status filters to one of pending/approved/executed/failed/rejected; account filters by account id; limit caps the response (max 100). Read-only.

get_draftC

Show one draft by id. Read-only.

reject_draftA

Reject a pending draft so it can never be approved. Local status change only — nothing touches X.

get_run_statusA

Poll run_cycle handles. With run_id omitted, lists every run started since this server booted. Read-only.

get_account_healthA

Read-only health snapshot for one account: config presence, cookie-file validity, metrics counters, warm-session state, queue depth, pending drafts. Never starts a browser. A config that fails validation is REPORTED (config.valid=false with the error), not raised — surfacing that is the point of a health check.

research_and_stageA

Search each keyword, keep relevant tweets (keyless heuristic), write a reply per tweet with the server-side LLM (persona-aware), and stage one reply DRAFT per tweet. Nothing is posted — review with list_drafts and approve selectively. Requires the 'llm' block in settings.

draft_post_variations

Generate count distinct takes on a topic with the server-side LLM (persona-aware) and stage each as a post DRAFT. Nothing is posted — approve one, reject the rest. Requires the 'llm' block in settings.

list_proxies

List proxy pools (size, masked members, rotation cursor), the global pool strategy, each account's assignment, and the global fallback proxy. Read-only — never starts a browser.

add_proxyA

Add a proxy URL to a named pool (created if new) in settings.json — validated, deduped, backed up, atomic. Credentials are masked in the response. Assign it to accounts via update_account(proxy="pool:") or a direct URL.

remove_proxyA

Remove a proxy URL from a pool. Requires confirm=true. The response lists accounts still assigned pool: — emptying a referenced pool is allowed but reported (those accounts fall back to no proxy).

test_proxyA

Probe a proxy with a throwaway browser: resolves the effective proxy (explicit proxy_url wins; otherwise the account's direct URL or pool: assignment), opens an IP-echo page, and reports the egress IP + latency. The probe browser is throwaway and cookieless — never account cookies or the warm session pool — but startup performs an anonymous x.com/home load before the IP-echo fetch, so latency_ms includes browser boot. With a round_robin pool, probing via account advances the pool's rotation cursor. Credentials masked in the response.

Prompts

Interactive templates invoked by user choice

NameDescription
research_nicheResearch what is worth engaging with on X for one account. Read-only: searches keywords and watched profiles, reads candidates including their images, and reports a scored shortlist. Stages nothing.
draft_repliesWrite and stage X replies or posts for one account in its persona. Produces drafts or queued items for review and publishes nothing.
review_and_publishReview everything staged for one X account and publish only what the user approves by id. This is the workflow that makes things public.
daily_checkDaily digest for one X account: health, metrics, pending drafts, and queue state in one read-only pass, then act only on the user's direction.
setup_accountSet up x-use from nothing: verify the install, add an X account from a cookie export, and configure its niche, keywords, and persona.

Resources

Contextual data attached and managed by the client

NameDescription
x-use accountsEvery configured X account with secrets stripped: id, active state, target keywords, and whether a persona is set. Never starts a browser.
x-use pending draftsEvery draft awaiting approval, across all accounts, with the exact text that would publish. Nothing here has reached X.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ihuzaifashoukat/x-use'

If you have feedback or need assistance with the MCP directory API, please join our Discord server