get_article
Fetch X articles (long-form posts) by ID or URL, returning preview, plain text, or full rich content for analysis or archiving.
Instructions
Fetch an X Article (long-form post) by rest_id or URL.
Two-hop reader flow (issue #10):
ArticleRedirectScreenQueryresolves the article rest_id to the underlying tweet rest_id.TweetResultByRestId(twikit's existing helper) fetches the tweet with article fieldToggles enabled. The body lives attweet.article.article_results.result.
Requires authentication via cookies — same as every other authenticated tool here. No env-var setup.
Args: article_id: Article rest_id (numeric string) or full /i/article/ URL. format: Output shape, one of: - "preview" (~1 KB) — rest_id, title, preview_text, cover_image - "plain" (~20 KB, default) — above + plain_text + media URL list + lifecycle_state. The LLM-friendly shape. - "full" (~150 KB+) — raw GraphQL payload including the heavy content_state rich-block tree. Use only when you need it (rich-content rendering, archiving, structure analysis).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"article_id": "<article_id>"
},
"name": "get_article"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | plain | |
| article_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |