Skip to main content
Glama
crazyrabbitLTC

Twitter MCP Server

createList

Generate and manage Twitter lists by defining a name, description, and privacy settings, enabling organized curation of accounts and tweets through the Twitter MCP Server.

Instructions

Create a new Twitter list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoA description of the list
nameYesThe name of the list
privateNoWhether the list should be private

Implementation Reference

  • The core handler function that implements the 'createList' tool by validating the Twitter client and calling the Twitter API's createList method.
    export async function handleCreateList( client: TwitterClient | null, args: CreateListArgs ): Promise<HandlerResponse> { if (!client) { return createMissingTwitterApiKeyResponse('createList'); } try { const list = await client.createList(args.name, args.description, args.isPrivate); if (!list.data) { throw new Error('Failed to create list'); } return createResponse(`Successfully created list: ${list.data.name}`); } catch (error) { if (error instanceof Error) { throw new Error(formatTwitterError(error, 'creating list')); } throw new Error('Failed to create list: Unknown error occurred'); } }
  • TypeScript interface defining the input parameters for the createList handler.
    export interface CreateListArgs { name: string; description?: string; isPrivate?: boolean; }
  • src/tools.ts:321-332 (registration)
    MCP tool registration object defining the 'createList' tool's description and JSON input schema, exported as part of TOOLS.
    createList: { description: 'Create a new Twitter list', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'The name of the list' }, description: { type: 'string', description: 'A description of the list' }, private: { type: 'boolean', description: 'Whether the list should be private' } }, required: ['name'], }, },
  • src/index.ts:280-287 (registration)
    Dispatch case in the main CallToolRequestSchema handler that extracts arguments and invokes the createList handler.
    case 'createList': { const { name, description, isPrivate } = request.params.arguments as { name: string; description?: string; isPrivate?: boolean; }; response = await handleCreateList(client, { name, description, isPrivate }); break;

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/crazyrabbitLTC/mcp-twitter-server'

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