refresh_analytics
Fetch fresh analytics for a published post from the provider and store a new snapshot, then return it. Supported providers: Instagram, TikTok, YouTube, Reddit, X, Pinterest, Snapchat (others return an unsupported snapshot). Call this before get_analytics when you need current numbers rather than the last stored snapshot.
Calling it
Invoke this tool with a JSON-RPC 2.0 tools/call request against the hosted MCP endpoint at POST https://getsocialclaw.com/mcp. Send your workspace API key as Authorization: Bearer sc_live_your_key. In an MCP client (Claude, Cursor, Claude Code) the client makes this call for you — just ask it to use refresh_analytics.
Arguments
| Parameter | Type | Description | |
|---|---|---|---|
postId |
string |
required | The published post id to refresh. |
window |
string |
optional | Optional analytics window, e.g. 7d (default lifetime). |
Example request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "refresh_analytics",
"arguments": {
"postId": "post_123"
}
}
}
Response
The server replies with a JSON-RPC result whose content array carries the tool output as a JSON-encoded text block. isError is true when the call failed.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{ /* JSON-encoded tool result */ }"
}
],
"isError": false
}
}