Write X replies
Three jobs for the X reply writer, each with the call that does it
x-reply-v1 writes a reply from the thread you are answering, your goal and your facts. The thread is someone else's text, so the read returns it marked _untrusted. See X writers.
Answer a question in a thread
curl -s https://app.makesmores.com/api/v1/drafts \
-H "Authorization: Bearer $SMORE_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<JSON
{
"platform": "x",
"type": "reply",
"idempotency_key": "reply-$(date +%s)",
"thread": [
{ "from": "Original post", "body": "Anyone found a good way to see which subreddits talk about their product?" }
],
"goal": "Answer helpfully and mention that mention trackers can do this",
"facts": [
"A mention tracker counts a term in one subreddit across its full history",
"Reports show the share of active people who used the term each month"
]
}
JSON
Reply to a fresh post that is taking off
X signals finds fresh posts worth a reply. Take the first one's text into the thread.
POST=$(curl -s https://app.makesmores.com/api/v1/mcp \
-H "Authorization: Bearer $SMORE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "smore_find_x_posts", "arguments": {"limit": 1}}}' \
| sed -n -e 's/^data: //' -e '/^{/p' \
| jq -r '(.result.structuredContent.posts[0].text_untrusted // "What tools do you use to find customers?")
| gsub("https?://\\S+"; "") | gsub("[\\[\\]<>]"; "") | .[0:1000]')
jq -n --arg body "$POST" --arg key "fresh-$(date +%s)" \
--arg fact "Mention trackers count a term in a subreddit across its full history" '{
platform: "x", type: "reply", idempotency_key: $key,
thread: [{from: "Original post", body: $body}],
goal: "Add one useful point to the conversation",
facts: [$fact]
}' | curl -s https://app.makesmores.com/api/v1/drafts \
-H "Authorization: Bearer $SMORE_API_KEY" \
-H "Content-Type: application/json" \
-d @-
The jq step drops links and brackets and keeps the first 1,000 characters, since no thread message may hold a link or a [slot]. Replace the fact with your own. The writer states only what your facts hold.
Follow up in your own thread
Put your earlier post and the replies in thread, oldest first, and ask for a follow-up that answers the most common question.
curl -s https://app.makesmores.com/api/v1/drafts \
-H "Authorization: Bearer $SMORE_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<JSON
{
"platform": "x",
"type": "reply",
"idempotency_key": "follow-up-$(date +%s)",
"thread": [
{ "from": "You", "body": "Our public API is open today. One key for every product." },
{ "from": "Reply", "body": "Is there a free tier?" }
],
"goal": "Answer the free tier question",
"facts": ["Personal workspaces get free credits every month", "Team workspaces buy credits in packs"]
}
JSON