x_follow_set
Follow or unfollow any X user by numeric ID, handle, or profile URL. Get the resulting following status, including pending approval for protected accounts.
Instructions
X (Twitter): follow or unfollow a user as the authenticated user. user accepts a numeric id, handle, @handle, or profile URL (a single target — no batch, by design); action selects follow or unfollow. A reversible social-graph write — the result reports the resulting following state, plus pending_follow when the target is protected and the follow awaits their approval. (disabled by policy read-only)
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": {
"user": "<user>",
"action": "<action>"
},
"name": "x_follow_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | Target user: numeric id, handle, @handle, or profile URL (not "me"). | |
| action | Yes | Whether to follow or unfollow the user. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| meta | Yes | ||
| summary | No |