get_post_stats
Retrieve statistics for social media posts across X, Instagram, and Threads to analyze performance and track engagement metrics.
Instructions
Get statistics about your posts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:305-316 (handler)The handler function that implements the get_post_stats tool. It calls the API endpoint '/posts/stats' using the shared apiRequest method and returns formatted statistics.private async getPostStats() { const { stats } = await this.apiRequest('GET', '/posts/stats'); return { content: [ { type: 'text', text: `Post Statistics:\n- Total: ${stats.total}\n- Published: ${stats.published}\n- Failed: ${stats.failed}\n- Scheduled: ${stats.scheduled}`, }, ], }; }
- src/index.ts:121-128 (schema)The tool schema definition for get_post_stats, registered in the ListTools response. It has no input parameters.{ name: 'get_post_stats', description: 'Get statistics about your posts', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:150-152 (registration)The dispatch case in the CallToolRequest handler that routes 'get_post_stats' calls to the getPostStats method.case 'get_post_stats': return await this.getPostStats(); default: