Skip to main content
Glama
vidhupv

X(Twitter) MCP Server

by vidhupv

list_drafts

Retrieve saved draft tweets and threads for review or editing before publishing on X/Twitter.

Instructions

List all draft tweets and threads

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that lists all draft tweets and threads by reading JSON files from the 'drafts' directory and returning their details as a JSON-formatted text content.
    async def handle_list_drafts(arguments: Any) -> Sequence[TextContent]:
        try:
            drafts = []
            if os.path.exists("drafts"):
                for filename in os.listdir("drafts"):
                    filepath = os.path.join("drafts", filename)
                    with open(filepath, "r") as f:
                        draft = json.load(f)
                    drafts.append({"id": filename, "draft": draft})
            return [
                TextContent(
                    type="text",
                    text=json.dumps(drafts, indent=2),
                )
            ]
        except Exception as e:
            logger.error(f"Error listing drafts: {str(e)}")
            raise RuntimeError(f"Error listing drafts: {str(e)}")
  • The tool schema definition including name, description, and empty input schema (no parameters required).
    Tool(
        name="list_drafts",
        description="List all draft tweets and threads",
        inputSchema={
            "type": "object",
            "properties": {},
            "required": [],
        },
    ),
  • The dispatch logic in the call_tool handler that routes 'list_drafts' tool calls to the specific handle_list_drafts function.
    elif name == "list_drafts":
        return await handle_list_drafts(arguments)
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 what the tool does but doesn't describe behavioral traits such as whether it returns all drafts at once, supports pagination, requires authentication, or has rate limits. This is inadequate for a tool with zero annotation coverage.

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 purpose without any wasted words. It's appropriately sized for a simple list operation with no parameters, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavior, output format, or integration with siblings, leaving gaps that could hinder effective use by an agent.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description doesn't need to add parameter semantics, and it correctly implies no filtering or options are available, earning a baseline score of 4 for this context.

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 verb ('List') and resource ('all draft tweets and threads'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'delete_draft' or 'publish_draft' beyond the obvious list vs. action distinction, which prevents a perfect score.

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. It doesn't mention prerequisites, context for listing drafts, or how it relates to sibling tools like 'create_draft_tweet' or 'publish_draft', leaving the agent to infer usage.

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/vidhupv/x-mcp'

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