Skip to main content
Glama
TwitterAPIs

twitterapis

twitter_customer_session

Register your X (Twitter) account session with auth_token and ct0 cookies to enable authenticated and write tools to act as you. Optionally include proxy and user agent; validates the session.

Instructions

Register YOUR OWN X account session against your API key, so the authenticated-account tools (twitter_home_timeline, twitter_bookmarks, twitter_dm_list, twitter_dm_conversation, twitter_user_likes, twitter_article_list) and the write tools (twitter_create_tweet, twitter_dm_send, twitter_follow_user, twitter_favorite_tweet, twitter_retweet, twitter_media_upload, twitter_article_create, twitter_article_update_title, twitter_article_update_content, twitter_article_publish, twitter_article_unpublish, twitter_article_delete) act as your account. Provide your x.com session cookies auth_token and ct0 (copy them from a logged-in browser); optionally a user_agent and a residential proxy_url. The cookies are stored server-side against your key and are never returned. Returns ok, the resolved username, and whether the session validated live. Prefer twitter_user_login if you would rather pass a username/password than raw cookies. Most tools also accept auth_token/ct0 per-call without registering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ct0YesYour x.com ct0 (CSRF) cookie value, from the same browser session. Paired with auth_token.
proxy_urlNoOptional. HTTP or SOCKS proxy URL to route this session's traffic through, e.g. 'http://user:pass@host:port'.
auth_tokenYesYour x.com auth_token cookie value, from a logged-in browser session. Stored server-side against your key; never returned.
user_agentNoOptional. Browser User-Agent to send with this session's requests. Defaults to a current Chrome UA.
Behavior5/5

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

The description goes beyond annotations: it states cookies are stored server-side, never returned, and that the tool returns ok, resolved username, and validation status. This addresses security (sensitive data handling) and validation behavior, which is highly valuable given the write-capable scope. Annotations only state non-readOnly and non-destructive, so the description adds critical context without contradiction.

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 a single paragraph but information-dense, listing tool names and options clearly. It front-loads the primary purpose and security note, though the long list of tool names could be abbreviated for brevity. It is slightly long but each part contributes to usage clarity.

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?

Given the tool's complexity (authentication setup, side effects), the schema covers all parameters, and the description explains the registration flow, storage, return values, and alternatives. Without an output schema, it still conveys what the agent can expect (ok, username, validation). It is complete for an authentication setup tool with this level of 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?

The schema has 100% coverage, with each parameter described (auth_token, ct0, proxy_url, user_agent). The description adds context by mentioning that cookies are paired and that proxy_url is for residential proxies, but these details are largely redundant with the schema. Since the schema fully explains the parameters, the description adds minimal extra meaning, matching the baseline of 3.

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 clearly states the tool registers the user's own X account session via cookies against an API key, distinguishing it from alternatives like twitter_user_login. It explicitly lists the affected authenticated and write tools, making the purpose and resource clear. It loses one point because the main verb 'register' is implied rather than explicitly stated, and the title already conveys similar meaning.

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?

The description explicitly says when to use this tool ('Register YOUR OWN X account session') and contrasts with twitter_user_login for username/password, and notes per-call cookie alternatives for most tools. This provides clear guidance on alternatives and exclusions, which is exemplary. It also outlines optional parameters like proxy_url and user_agent for advanced use cases.

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

Install Server

Other Tools

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/TwitterAPIs/twitterapis-mcp'

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