Skip to main content
Glama
pascalporedda

Typefully MCP Server

create_draft

Create a new tweet or thread draft on Typefully; optionally schedule, split into multiple tweets, or enable auto-retweet and auto-plug.

Instructions

Create a new draft on Typefully. Supports single tweets and threads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe content of the tweet or thread. Use 4 consecutive newlines (\n\n\n\n) to separate tweets in a thread.
threadifyNoAutomatically split content into tweets if it exceeds character limits.
schedule_dateNoISO date string for scheduling the tweet (e.g., "2024-12-25T10:00:00Z").
auto_retweet_enabledNoEnable automatic retweet.
auto_plug_enabledNoEnable automatic plug.

Implementation Reference

  • The core handler for the 'create_draft' tool. Extracts arguments (content, threadify, schedule_date, auto_retweet_enabled, auto_plug_enabled) from the MCP request, maps them to a CreateDraftRequest, calls this.client.createDraft(), and returns a formatted success response.
    case 'create_draft': {
      if (!args) {
        throw new McpError(ErrorCode.InvalidParams, 'Arguments are required');
      }
      
      const draftRequest: CreateDraftRequest = {
        content: args.content as string,
        threadify: args.threadify as boolean | undefined,
        'schedule-date': args.schedule_date as string | undefined,
        auto_retweet_enabled: args.auto_retweet_enabled as boolean | undefined,
        auto_plug_enabled: args.auto_plug_enabled as boolean | undefined,
      };
    
      const draft = await this.client.createDraft(draftRequest);
      
      return {
        content: [
          {
            type: 'text',
            text: `Draft created successfully!\n\nID: ${draft.id}\nContent: ${draft.content}\nScheduled: ${draft.scheduled_date || 'Not scheduled'}\nShare URL: ${draft.share_url || 'Not available'}`,
          },
        ],
      };
    }
  • Zod validation schema for CreateDraftRequest, defining the shape and types of the request (content required string, optional threadify boolean, schedule-date string, auto_retweet_enabled boolean, auto_plug_enabled boolean).
    export const CreateDraftRequestSchema = z.object({
      content: z.string().min(1, 'Content is required'),
      threadify: z.boolean().optional(),
      'schedule-date': z.string().optional(),
      auto_retweet_enabled: z.boolean().optional(),
      auto_plug_enabled: z.boolean().optional(),
    });
  • src/server.ts:38-68 (registration)
    Tool registration in ListToolsRequestSchema handler. Defines the tool name 'create_draft', description, input schema (content required, plus optional parameters threadify, schedule_date, auto_retweet_enabled, auto_plug_enabled).
    name: 'create_draft',
    description: 'Create a new draft on Typefully. Supports single tweets and threads.',
    inputSchema: {
      type: 'object',
      properties: {
        content: {
          type: 'string',
          description: 'The content of the tweet or thread. Use 4 consecutive newlines (\\n\\n\\n\\n) to separate tweets in a thread.',
        },
        threadify: {
          type: 'boolean',
          description: 'Automatically split content into tweets if it exceeds character limits.',
          default: false,
        },
        schedule_date: {
          type: 'string',
          description: 'ISO date string for scheduling the tweet (e.g., "2024-12-25T10:00:00Z").',
        },
        auto_retweet_enabled: {
          type: 'boolean',
          description: 'Enable automatic retweet.',
          default: false,
        },
        auto_plug_enabled: {
          type: 'boolean',
          description: 'Enable automatic plug.',
          default: false,
        },
      },
      required: ['content'],
    },
  • Client method that validates the request with CreateDraftRequestSchema and makes the HTTP POST to Typefully's /drafts/ API endpoint, returning the Draft response.
    async createDraft(request: CreateDraftRequest): Promise<Draft> {
      const validatedRequest = CreateDraftRequestSchema.parse(request);
      
      const response = await this.client.post('/drafts/', validatedRequest);
      return response.data;
    }
Behavior4/5

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

Without annotations, description clearly indicates it creates a draft (non-destructive), but could mention that it does not publish directly.

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?

Two concise sentences, front-loaded with key action, no wasted words.

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

Completeness4/5

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

Given low complexity and no output schema, description is mostly adequate but lacks information on return value or post-creation behavior.

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 fully describes all 5 parameters (100% coverage); description adds minimal value beyond mentioning thread support, which is already in schema.

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

Purpose5/5

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

Description clearly states the verb 'Create' and resource 'a new draft on Typefully', and specifies support for single tweets and threads, distinguishing it from sibling tools which get drafts.

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

Usage Guidelines3/5

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

No explicit guidance on when to use vs alternatives; it implies creation of drafts but does not mention when not to use or contrast with siblings.

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/pascalporedda/typefully-mcp-server'

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