@tpmjs/createblogpost
Creates a structured blog post with frontmatter, metadata, slug, word count, and reading time. Outputs in Markdown or MDX format.
Test @tpmjs/createblogpost (createBlogPostTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/createblogpostpnpm add @tpmjs/createblogpostyarn add @tpmjs/createblogpostbun add @tpmjs/createblogpostdeno add npm:@tpmjs/createblogpostimport { createBlogPostTool } from '@tpmjs/createblogpost';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { createBlogPostTool } from '@tpmjs/createblogpost';
const result = await generateText({
model: openai('gpt-4o'),
tools: { createBlogPostTool },
prompt: 'Your prompt here...',
});
console.log(result.text);How AI agents can use this tool
Use this tool when users need to generate blog posts, articles, or structured content with proper frontmatter and metadata. Ideal for content management systems, static site generators, and documentation sites.
Does not include AI content generation - you must provide the content. Only formats and structures existing content.
Available configuration options
titlestringThe title of the blog post
authorstringThe author of the blog post
contentstringThe main content of the blog post
tagsarrayArray of tags for categorization
formatstringOutput format for the blog post (default: markdown)
excerptstringShort excerpt or summary of the post
Schema extracted: 1/15/2026, 3:44:46 AM
A tool for creating structured blog posts with frontmatter and metadata. Part of the TPMJS registry.
npm install @tpmjs/createblogpost # or pnpm add @tpmjs/createblogpost # or yarn add @tpmjs/createblogpost
import { createBlogPost } from '@tpmjs/createblogpost'; const post = await createBlogPost({ title: 'Getting Started with TypeScript', author: 'John Doe', content: 'TypeScript is a typed superset of JavaScript that compiles to plain JavaScript...', tags: ['typescript', 'javascript', 'programming'], excerpt: 'Learn the basics of TypeScript in this comprehensive guide', format: 'markdown', }); console.log(post.formattedOutput);
createBlogPost(options: BlogPostOptions): Promise<BlogPost>Creates a structured blog post with frontmatter and metadata.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | Yes | - | The title of the blog post |
author | string | Yes | - | The author of the blog post |
content | string | Yes | - | The main content of the blog post |
tags | string[] | No | [] | Array of tags for categorization |
format | 'markdown' | 'mdx' | No | 'markdown' | Output format for the blog post |
excerpt | string | No | - | Short excerpt or summary of the post |
publishDate | Date | No | new Date() | Publication date |
Returns a BlogPost object with the following structure:
{ frontmatter: { title: string; author: string; date: string; // ISO date format (YYYY-MM-DD) tags: string[]; slug: string; // Auto-generated from title wordCount: number; // Calculated from content readingTime: number; // Estimated minutes to read excerpt?: string; }; content: string; formattedOutput: string; // Complete post with frontmatter }
--- title: "Getting Started with TypeScript" author: John Doe date: 2025-11-28 slug: getting-started-with-typescript tags: ["typescript", "javascript", "programming"] excerpt: "Learn the basics of TypeScript in this comprehensive guide" wordCount: 250 readingTime: 2 --- TypeScript is a typed superset of JavaScript that compiles to plain JavaScript...
MIT
Downloads/month
22
GitHub Stars
0
Quality Score