Skip to main content
Glama
crazyrabbitLTC

Twitter MCP Server

createList

Create a new Twitter list to organize accounts by topic or interest, specifying name, description, and privacy settings.

Instructions

Create a new Twitter list

Input Schema

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

Implementation Reference

  • Main handler function executing the createList tool logic: checks for Twitter client, calls client.createList, handles success/error responses.
    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');
        }
    }
  • MCP tool input schema definition for createList, including properties and requirements.
    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)
    Tool registration in MCP CallToolRequestHandler: extracts arguments and invokes handleCreateList.
    case 'createList': {
        const { name, description, isPrivate } = request.params.arguments as { 
            name: string;
            description?: string;
            isPrivate?: boolean;
        };
        response = await handleCreateList(client, { name, description, isPrivate });
        break;
  • TypeScript interface defining input arguments for createList handler.
    export interface CreateListArgs {
        name: string;
        description?: string;
        isPrivate?: boolean;
    }
  • TwitterClient helper method wrapping Twitter API v2 list creation with rate limit retry logic.
    async createList(name: string, description: string = '', isPrivate: boolean = false) {
        return this.withRateLimitRetry('createList', () => 
            this.v2.createList({
                name,
                description,
                private: isPrivate
            })
        );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility for behavioral disclosure. While 'Create' implies a write/mutation operation, the description doesn't mention authentication requirements, rate limits, what happens on success/failure, or whether the list becomes immediately available. This leaves significant behavioral gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states exactly what the tool does without any wasted words. It's perfectly front-loaded and appropriately sized for its purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after creation, what gets returned, error conditions, or authentication requirements. Given the complexity of creating a resource in a social media API, this leaves too many contextual gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with all three parameters clearly documented in the schema itself. The description doesn't add any additional parameter context beyond what's already in the schema, so it meets the baseline expectation but doesn't provide extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new Twitter list'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'getUserLists' or 'addUserToList', which would require more specific context about what makes this creation tool unique.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (like authentication), when this should be used instead of other list-related tools, or any constraints on usage. The agent receives no contextual direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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