Skip to main content
Glama
crazyrabbitLTC

Twitter MCP Server

unmuteUser

Restore visibility of tweets from a muted Twitter user by providing their user ID or username. This action reverses a previous mute setting.

Instructions

Unmute a previously muted user account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdNoThe ID of the user to unmute
usernameNoThe username of the user to unmute (alternative to userId)

Implementation Reference

  • Core handler function that executes the unmuteUser tool: resolves user ID if needed, calls Twitter v2.unmute API, handles errors and returns response.
    export const handleUnmuteUser: TwitterHandler<UnmuteUserArgs> = async (
        client: TwitterClient | null,
        { userId, username }: UnmuteUserArgs
    ): Promise<HandlerResponse> => {
        if (!client) {
            return createMissingTwitterApiKeyResponse('unmuteUser');
        }
        
        try {
            if (!userId && !username) {
                throw new Error('Either userId or username must be provided');
            }
    
            let targetUserId = userId;
    
            // If username provided, get the user ID first
            if (username && !userId) {
                const userResponse = await client.v2.userByUsername(username);
                if (!userResponse.data) {
                    throw new Error(`User with username '${username}' not found`);
                }
                targetUserId = userResponse.data.id;
            }
    
            // Get authenticated user's ID
            const me = await client.v2.me();
            const myUserId = me.data.id;
    
            // Unmute the user
            const result = await client.v2.unmute(myUserId, targetUserId!);
    
            return createResponse(`Successfully unmuted user ${username || targetUserId}. Response: ${JSON.stringify(result, null, 2)}`);
        } catch (error) {
            if (error instanceof Error) {
                throw new Error(formatTwitterError(error, 'unmuting user'));
            }
            throw error;
        }
    };
  • MCP tool input schema definition for unmuteUser, specifying properties userId and username.
    unmuteUser: {
        description: 'Unmute a previously muted user account',
        inputSchema: {
            type: 'object',
            properties: {
                userId: { 
                    type: 'string', 
                    description: 'The ID of the user to unmute' 
                },
                username: { 
                    type: 'string', 
                    description: 'The username of the user to unmute (alternative to userId)' 
                }
            },
            required: []
        }
    },
  • TypeScript interface defining the arguments for the unmuteUser handler.
    export interface UnmuteUserArgs {
        userId?: string;
        username?: string;
    }
  • src/index.ts:411-414 (registration)
    Dispatch case in the main tool request handler that routes 'unmuteUser' calls to handleUnmuteUser.
    case 'unmuteUser': {
        const { userId, username } = request.params.arguments as { userId?: string; username?: string };
        response = await handleUnmuteUser(client, { userId, username });
        break;
  • src/index.ts:64-66 (registration)
    Import of the handleUnmuteUser function into the main index for tool dispatching.
        handleUnmuteUser,
        handleGetMutedUsers
    } from './handlers/moderation.handlers.js';
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is to 'unmute,' implying a mutation that reverses a mute, but doesn't cover permissions needed, rate limits, error conditions, or what happens if the user isn't muted. This leaves significant 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 front-loads the core action without unnecessary words. Every part earns its place by clearly stating the tool's purpose, making it highly concise and well-structured.

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?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., side effects, error handling) and doesn't explain return values, leaving the agent with insufficient context for reliable use.

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?

Schema description coverage is 100%, so the input schema fully documents the parameters (userId and username). The description adds no additional meaning beyond implying these identify the user, which the schema already covers. This meets the baseline of 3 for high schema coverage.

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 ('unmute') and target ('a previously muted user account'), which is specific and unambiguous. However, it doesn't explicitly differentiate from its sibling 'muteUser' beyond the opposite action, missing a direct comparison that would elevate it to a 5.

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 like 'unblockUser' or other user management tools, nor does it mention prerequisites (e.g., the user must be muted first). It only implies usage through the phrase 'previously muted,' but lacks explicit context or exclusions.

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