list_x_posts
Retrieve X posts with options to limit results or filter by thread ID for social media content management.
Instructions
List X (formerly Twitter) posts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of posts to return | |
| threadId | No | ID of the thread to filter by |
Implementation Reference
- src/index.ts:230-245 (handler)The handler logic for the 'list_x_posts' tool, which filters and returns X posts.
const { limit, threadId } = request.params.arguments; let filteredPosts = this.socialMediaPosts; if(threadId) { filteredPosts = filteredPosts.filter(post => post.threadId === threadId) } if(limit){ filteredPosts = filteredPosts.slice(0, limit); } return { content: [{ type: "text", text: JSON.stringify(filteredPosts, null, 2) }] } - src/index.ts:134-146 (registration)Registration of the 'list_x_posts' tool in the MCP server setup.
name: "list_x_posts", description: "List X (formerly Twitter) posts", inputSchema: { type: "object", properties: { limit: { type: "number", description: "Maximum number of posts to return" }, threadId: { type: "string", description: "ID of the thread to filter by" }