X (Twitter) · Capability
X API v2 — Stream
X API v2 — Stream. 22 operations. Lead operation: X Activity Stream. Self-contained Naftiko capability covering one Twitter business surface.
What You Can Do
GET
Activitystream
— X Activity Stream
/v1/2/activity/stream
POST
Createactivitysubscription
— X Create X Activity Subscription
/v1/2/activity/subscriptions
GET
Streamlikescompliance
— X Stream Likes Compliance Data
/v1/2/likes/compliance/stream
GET
Streamlikesfirehose
— X Stream All Likes
/v1/2/likes/firehose/stream
GET
Streamlikessample10
— X Stream Sampled Likes
/v1/2/likes/sample10/stream
GET
Streampostscompliance
— X Stream Posts Compliance Data
/v1/2/tweets/compliance/stream
GET
Streampostsfirehose
— X Stream All Posts
/v1/2/tweets/firehose/stream
GET
Streampostsfirehoseen
— X Stream English Posts
/v1/2/tweets/firehose/stream/lang/en
GET
Streampostsfirehoseja
— X Stream Japanese Posts
/v1/2/tweets/firehose/stream/lang/ja
GET
Streampostsfirehoseko
— X Stream Korean Posts
/v1/2/tweets/firehose/stream/lang/ko
GET
Streampostsfirehosept
— X Stream Portuguese Posts
/v1/2/tweets/firehose/stream/lang/pt
GET
Streamlabelscompliance
— X Stream Post Labels
/v1/2/tweets/label/stream
GET
Streampostssample
— X Stream Sampled Posts
/v1/2/tweets/sample/stream
GET
Streampostssample10
— X Stream 10% Sampled Posts
/v1/2/tweets/sample10/stream
GET
Streamposts
— X Stream Filtered Posts
/v1/2/tweets/search/stream
GET
Getrules
— X Get Stream Rules
/v1/2/tweets/search/stream/rules
POST
Updaterules
— X Update Stream Rules
/v1/2/tweets/search/stream/rules
GET
Getrulecounts
— X Get Stream Rule Counts
/v1/2/tweets/search/stream/rules/counts
GET
Getwebhooksstreamlinks
— X Get Stream Links
/v1/2/tweets/search/webhooks
DELETE
Deletewebhooksstreamlink
— X Delete Stream Link
/v1/2/tweets/search/webhooks/{webhook-id}
POST
Createwebhooksstreamlink
— X Create Stream Link
/v1/2/tweets/search/webhooks/{webhook-id}
GET
Streamuserscompliance
— X Stream Users Compliance Data
/v1/2/users/compliance/stream
MCP Tools
x-activity-stream
X Activity Stream
read-only
idempotent
x-create-x-activity-subscription
X Create X Activity Subscription
x-stream-likes-compliance-data
X Stream Likes Compliance Data
read-only
idempotent
x-stream-all-likes
X Stream All Likes
read-only
idempotent
x-stream-sampled-likes
X Stream Sampled Likes
read-only
idempotent
x-stream-posts-compliance-data
X Stream Posts Compliance Data
read-only
idempotent
x-stream-all-posts
X Stream All Posts
read-only
idempotent
x-stream-english-posts
X Stream English Posts
read-only
idempotent
x-stream-japanese-posts
X Stream Japanese Posts
read-only
idempotent
x-stream-korean-posts
X Stream Korean Posts
read-only
idempotent
x-stream-portuguese-posts
X Stream Portuguese Posts
read-only
idempotent
x-stream-post-labels
X Stream Post Labels
read-only
idempotent
x-stream-sampled-posts
X Stream Sampled Posts
read-only
idempotent
x-stream-10-sampled-posts
X Stream 10% Sampled Posts
read-only
idempotent
x-stream-filtered-posts
X Stream Filtered Posts
read-only
idempotent
x-get-stream-rules
X Get Stream Rules
read-only
idempotent
x-update-stream-rules
X Update Stream Rules
x-get-stream-rule-counts
X Get Stream Rule Counts
read-only
idempotent
x-get-stream-links
X Get Stream Links
read-only
idempotent
x-delete-stream-link
X Delete Stream Link
idempotent
x-create-stream-link
X Create Stream Link
x-stream-users-compliance-data
X Stream Users Compliance Data
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: X API v2 — Stream
description: 'X API v2 — Stream. 22 operations. Lead operation: X Activity Stream. Self-contained Naftiko capability covering
one Twitter business surface.'
tags:
- Twitter
- Stream
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
TWITTER_API_KEY: TWITTER_API_KEY
capability:
consumes:
- type: http
namespace: x-stream
baseUri: https://api.x.com
description: X API v2 — Stream business capability. Self-contained, no shared references.
resources:
- name: 2-activity-stream
path: /2/activity/stream
operations:
- name: activitystream
method: GET
description: X Activity Stream
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided.
- name: 2-activity-subscriptions
path: /2/activity/subscriptions
operations:
- name: createactivitysubscription
method: POST
description: X Create X Activity Subscription
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: 2-likes-compliance-stream
path: /2/likes/compliance/stream
operations:
- name: streamlikescompliance
method: GET
description: X Stream Likes Compliance Data
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided.
- name: 2-likes-firehose-stream
path: /2/likes/firehose/stream
operations:
- name: streamlikesfirehose
method: GET
description: X Stream All Likes
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-likes-sample10-stream
path: /2/likes/sample10/stream
operations:
- name: streamlikessample10
method: GET
description: X Stream Sampled Likes
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-tweets-compliance-stream
path: /2/tweets/compliance/stream
operations:
- name: streampostscompliance
method: GET
description: X Stream Posts Compliance Data
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Post Compliance events will be provided.
- name: 2-tweets-firehose-stream
path: /2/tweets/firehose/stream
operations:
- name: streampostsfirehose
method: GET
description: X Stream All Posts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-tweets-firehose-stream-lang-en
path: /2/tweets/firehose/stream/lang/en
operations:
- name: streampostsfirehoseen
method: GET
description: X Stream English Posts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-tweets-firehose-stream-lang-ja
path: /2/tweets/firehose/stream/lang/ja
operations:
- name: streampostsfirehoseja
method: GET
description: X Stream Japanese Posts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-tweets-firehose-stream-lang-ko
path: /2/tweets/firehose/stream/lang/ko
operations:
- name: streampostsfirehoseko
method: GET
description: X Stream Korean Posts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-tweets-firehose-stream-lang-pt
path: /2/tweets/firehose/stream/lang/pt
operations:
- name: streampostsfirehosept
method: GET
description: X Stream Portuguese Posts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-tweets-label-stream
path: /2/tweets/label/stream
operations:
- name: streamlabelscompliance
method: GET
description: X Stream Post Labels
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided.
- name: 2-tweets-sample-stream
path: /2/tweets/sample/stream
operations:
- name: streampostssample
method: GET
description: X Stream Sampled Posts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: 2-tweets-sample10-stream
path: /2/tweets/sample10/stream
operations:
- name: streampostssample10
method: GET
description: X Stream 10% Sampled Posts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-tweets-search-stream
path: /2/tweets/search/stream
operations:
- name: streamposts
method: GET
description: X Stream Filtered Posts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
- name: 2-tweets-search-stream-rules
path: /2/tweets/search/stream/rules
operations:
- name: getrules
method: GET
description: X Get Stream Rules
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: ids
in: query
type: array
description: A comma-separated list of Rule IDs.
- name: max_results
in: query
type: integer
description: The maximum number of results.
- name: pagination_token
in: query
type: string
description: This value is populated by passing the 'next_token' returned in a request to paginate through results.
- name: updaterules
method: POST
description: X Update Stream Rules
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: dry_run
in: query
type: boolean
description: Dry Run can be used with both the add and delete action, with the expected result given, but without
actually taking any action in the system (meaning the end s
- name: delete_all
in: query
type: boolean
description: Delete All can be used to delete all of the rules associated this client app, it should be specified
with no other parameters. Once deleted, rules cannot be rec
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: 2-tweets-search-stream-rules-counts
path: /2/tweets/search/stream/rules/counts
operations:
- name: getrulecounts
method: GET
description: X Get Stream Rule Counts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: 2-tweets-search-webhooks
path: /2/tweets/search/webhooks
operations:
- name: getwebhooksstreamlinks
method: GET
description: X Get Stream Links
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: 2-tweets-search-webhooks-webhook_id
path: /2/tweets/search/webhooks/{webhook_id}
operations:
- name: deletewebhooksstreamlink
method: DELETE
description: X Delete Stream Link
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: webhook_id
in: path
type: string
description: The webhook ID to link to your FilteredStream ruleset.
required: true
- name: createwebhooksstreamlink
method: POST
description: X Create Stream Link
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: webhook_id
in: path
type: string
description: The webhook ID to link to your FilteredStream ruleset.
required: true
- name: tweet.fields
in: query
type: string
description: A comma separated list of Tweet fields to display.
- name: expansions
in: query
type: string
description: A comma separated list of fields to expand.
- name: media.fields
in: query
type: string
description: A comma separated list of Media fields to display.
- name: poll.fields
in: query
type: string
description: A comma separated list of Poll fields to display.
- name: user.fields
in: query
type: string
description: A comma separated list of User fields to display.
- name: place.fields
in: query
type: string
description: A comma separated list of Place fields to display.
- name: 2-users-compliance-stream
path: /2/users/compliance/stream
operations:
- name: streamuserscompliance
method: GET
description: X Stream Users Compliance Data
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: backfill_minutes
in: query
type: integer
description: The number of minutes of backfill requested.
- name: partition
in: query
type: integer
description: The partition number.
required: true
- name: start_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided.
- name: end_time
in: query
type: string
description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided.
authentication:
type: bearer
token: '{{env.TWITTER_API_KEY}}'
exposes:
- type: rest
namespace: x-stream-rest
port: 8080
description: REST adapter for X API v2 — Stream. One Spectral-compliant resource per consumed operation, prefixed with
/v1.
resources:
- path: /v1/2/activity/stream
name: 2-activity-stream
description: REST surface for 2-activity-stream.
operations:
- method: GET
name: activitystream
description: X Activity Stream
call: x-stream.activitystream
with:
backfill_minutes: rest.backfill_minutes
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/activity/subscriptions
name: 2-activity-subscriptions
description: REST surface for 2-activity-subscriptions.
operations:
- method: POST
name: createactivitysubscription
description: X Create X Activity Subscription
call: x-stream.createactivitysubscription
with:
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/2/likes/compliance/stream
name: 2-likes-compliance-stream
description: REST surface for 2-likes-compliance-stream.
operations:
- method: GET
name: streamlikescompliance
description: X Stream Likes Compliance Data
call: x-stream.streamlikescompliance
with:
backfill_minutes: rest.backfill_minutes
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/likes/firehose/stream
name: 2-likes-firehose-stream
description: REST surface for 2-likes-firehose-stream.
operations:
- method: GET
name: streamlikesfirehose
description: X Stream All Likes
call: x-stream.streamlikesfirehose
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/likes/sample10/stream
name: 2-likes-sample10-stream
description: REST surface for 2-likes-sample10-stream.
operations:
- method: GET
name: streamlikessample10
description: X Stream Sampled Likes
call: x-stream.streamlikessample10
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/compliance/stream
name: 2-tweets-compliance-stream
description: REST surface for 2-tweets-compliance-stream.
operations:
- method: GET
name: streampostscompliance
description: X Stream Posts Compliance Data
call: x-stream.streampostscompliance
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/firehose/stream
name: 2-tweets-firehose-stream
description: REST surface for 2-tweets-firehose-stream.
operations:
- method: GET
name: streampostsfirehose
description: X Stream All Posts
call: x-stream.streampostsfirehose
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/firehose/stream/lang/en
name: 2-tweets-firehose-stream-lang-en
description: REST surface for 2-tweets-firehose-stream-lang-en.
operations:
- method: GET
name: streampostsfirehoseen
description: X Stream English Posts
call: x-stream.streampostsfirehoseen
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/firehose/stream/lang/ja
name: 2-tweets-firehose-stream-lang-ja
description: REST surface for 2-tweets-firehose-stream-lang-ja.
operations:
- method: GET
name: streampostsfirehoseja
description: X Stream Japanese Posts
call: x-stream.streampostsfirehoseja
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/firehose/stream/lang/ko
name: 2-tweets-firehose-stream-lang-ko
description: REST surface for 2-tweets-firehose-stream-lang-ko.
operations:
- method: GET
name: streampostsfirehoseko
description: X Stream Korean Posts
call: x-stream.streampostsfirehoseko
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/firehose/stream/lang/pt
name: 2-tweets-firehose-stream-lang-pt
description: REST surface for 2-tweets-firehose-stream-lang-pt.
operations:
- method: GET
name: streampostsfirehosept
description: X Stream Portuguese Posts
call: x-stream.streampostsfirehosept
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/label/stream
name: 2-tweets-label-stream
description: REST surface for 2-tweets-label-stream.
operations:
- method: GET
name: streamlabelscompliance
description: X Stream Post Labels
call: x-stream.streamlabelscompliance
with:
backfill_minutes: rest.backfill_minutes
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/sample/stream
name: 2-tweets-sample-stream
description: REST surface for 2-tweets-sample-stream.
operations:
- method: GET
name: streampostssample
description: X Stream Sampled Posts
call: x-stream.streampostssample
with:
backfill_minutes: rest.backfill_minutes
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/sample10/stream
name: 2-tweets-sample10-stream
description: REST surface for 2-tweets-sample10-stream.
operations:
- method: GET
name: streampostssample10
description: X Stream 10% Sampled Posts
call: x-stream.streampostssample10
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/search/stream
name: 2-tweets-search-stream
description: REST surface for 2-tweets-search-stream.
operations:
- method: GET
name: streamposts
description: X Stream Filtered Posts
call: x-stream.streamposts
with:
backfill_minutes: rest.backfill_minutes
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/search/stream/rules
name: 2-tweets-search-stream-rules
description: REST surface for 2-tweets-search-stream-rules.
operations:
- method: GET
name: getrules
description: X Get Stream Rules
call: x-stream.getrules
with:
ids: rest.ids
max_results: rest.max_results
pagination_token: rest.pagination_token
outputParameters:
- type: object
mapping: $.
- method: POST
name: updaterules
description: X Update Stream Rules
call: x-stream.updaterules
with:
dry_run: rest.dry_run
delete_all: rest.delete_all
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/search/stream/rules/counts
name: 2-tweets-search-stream-rules-counts
description: REST surface for 2-tweets-search-stream-rules-counts.
operations:
- method: GET
name: getrulecounts
description: X Get Stream Rule Counts
call: x-stream.getrulecounts
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/search/webhooks
name: 2-tweets-search-webhooks
description: REST surface for 2-tweets-search-webhooks.
operations:
- method: GET
name: getwebhooksstreamlinks
description: X Get Stream Links
call: x-stream.getwebhooksstreamlinks
outputParameters:
- type: object
mapping: $.
- path: /v1/2/tweets/search/webhooks/{webhook-id}
name: 2-tweets-search-webhooks-webhook-id
description: REST surface for 2-tweets-search-webhooks-webhook_id.
operations:
- method: DELETE
name: deletewebhooksstreamlink
description: X Delete Stream Link
call: x-stream.deletewebhooksstreamlink
with:
webhook_id: rest.webhook_id
outputParameters:
- type: object
mapping: $.
- method: POST
name: createwebhooksstreamlink
description: X Create Stream Link
call: x-stream.createwebhooksstreamlink
with:
webhook_id: rest.webhook_id
tweet.fields: rest.tweet.fields
expansions: rest.expansions
media.fields: rest.media.fields
poll.fields: rest.poll.fields
user.fields: rest.user.fields
place.fields: rest.place.fields
outputParameters:
- type: object
mapping: $.
- path: /v1/2/users/compliance/stream
name: 2-users-compliance-stream
description: REST surface for 2-users-compliance-stream.
operations:
- method: GET
name: streamuserscompliance
description: X Stream Users Compliance Data
call: x-stream.streamuserscompliance
with:
backfill_minutes: rest.backfill_minutes
partition: rest.partition
start_time: rest.start_time
end_time: rest.end_time
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: x-stream-mcp
port: 9090
transport: http
description: MCP adapter for X API v2 — Stream. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: x-activity-stream
description: X Activity Stream
hints:
readOnly: true
destructive: false
idempotent: true
call: x-stream.activitystream
with:
backfill_minutes: tools.backfill_minutes
start_time: tools.start_time
end_time: tools.end_time
outputParameters:
- type: object
mapping: $.
- name: x-create-x-activity-subscription
description: X Create X Activity Subscription
hints:
readOnly: false
destructive: false
idempotent: false
call: x-stream.createactivitysubscription
with:
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: x-stream-likes-compliance-data
description: X Stream Likes Compliance Data
hints:
readOnly: true
destructive: false
idempotent: true
call: x-stream.streamlikescompliance
with:
backfill_minutes: tools.backfill_minutes
start_time: tools.start_time
end_time: tools.end_time
outputParameters:
- type: object
mapping: $.
- name: x-stream-all-likes
description: X Stream All Likes
hints:
readOnly: true
destructive: false
idempotent: true
call: x-stream.streamlikesfirehose
with:
backfill_minutes: tools.backfill_minutes
partition: tools.partition
start_time: tools.start_time
end_time: tools.end_time
outputParameters:
- type: object
mapping: $.
- name: x-stream-sampled-likes
description: X Stream Sampled Likes
hints:
readOnly: true
destructive: false
idempotent: true
call: x-stream.streamlikessample10
with:
backfill_minutes: tools.backfill_minutes
partition: tools.partition
start_time: tools.start_time
end_time: tools.end_time
outputParameters:
- type: object
mapping: $.
- name: x-stream-posts-compliance-data
description: X Stream Posts Compliance Data
hints:
readOnly: true
destructive: false
idempotent: true
call: x-stream.streampostscompliance
with:
backfill_minutes: tools.
# --- truncated at 32 KB (38 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/twitter/refs/heads/main/capabilities/x-stream.yaml