Skip to main content
Glama
angheljf

social-media-mcp

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
NameRequiredDescriptionDefault
limitNoMaximum number of posts to return
threadIdNoID of the thread to filter by

Implementation Reference

  • 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"
            }
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/angheljf/social-media-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server