Home/Tools/@tpmjs/social-post-draft

socialPostDraftTool

@tpmjs/social-post-draft

Drafts social media posts optimized for specific platforms (Twitter, LinkedIn, Instagram, Facebook) with appropriate hashtags, CTAs, and platform-specific best practices. Respects character limits and engagement patterns.

Official
marketing
v0.1.1
MIT
⚠️

This tool is currently broken

Execution Failed
Runtime error with test parameters
Invalid platform: test

Last checked: 2/28/2026, 4:00:31 AM

Interactive Playground

Test @tpmjs/social-post-draft (socialPostDraftTool) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/social-post-draft
pnpm add @tpmjs/social-post-draft
yarn add @tpmjs/social-post-draft
bun add @tpmjs/social-post-draft
deno add npm:@tpmjs/social-post-draft

2. Import the tool

import { socialPostDraftTool } from '@tpmjs/social-post-draft';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { socialPostDraftTool } from '@tpmjs/social-post-draft';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { socialPostDraftTool },
  prompt: 'Your prompt here...',
});

console.log(result.text);

AI Agent Integration

How AI agents can use this tool

Use Case

Use this tool when users need to create social media posts optimized for specific platforms. Handles character limits, hashtag generation, and platform-specific best practices.

Limitations

Does not include AI content generation - you must provide the core message. Only optimizes and formats existing content for platforms.

Examples

  • Draft a Twitter post about our new product launch
  • Create a LinkedIn post about our latest blog article
  • Generate an Instagram caption for our event photos

Signature

(message: string, platform: string, tone?: string) => Promise<unknown>

Tags

ai
content
draft
drafts
instagram
linkedin
marketing
media
optimized
platforms
post
posts
social
social-media
specific
tpmjs
twitter

Parameters

Available configuration options

Auto-extracted
message
Required
Type: string

Core message to communicate in the social post

platform
Required
Type: 'twitter' | 'linkedin' | 'instagram' | 'facebook'

Target social media platform

tone
Optional
Type: string

Desired tone (professional, casual, friendly, etc.)

Schema extracted: 2/28/2026, 4:00:31 AM

README

ERROR: No README data found!

Statistics

Downloads/month

109

GitHub Stars

0

Quality Score

84%

Bundle Size

NPM Keywords

tpmjs
social-media
marketing
content
ai

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai