From 96fb52d0478d537a60f0f97ea5999de5e08e682a Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Sat, 3 Jan 2026 19:21:05 +1000 Subject: [PATCH] feat: add createBlogPostTool and accept both q/query params in search API --- apps/web/src/app/api/tools/search/route.ts | 3 +- manual-tools.ts | 65 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/api/tools/search/route.ts b/apps/web/src/app/api/tools/search/route.ts index 6045e8a..42ae698 100644 --- a/apps/web/src/app/api/tools/search/route.ts +++ b/apps/web/src/app/api/tools/search/route.ts @@ -81,7 +81,8 @@ export async function GET(request: NextRequest) { try { const { searchParams } = new URL(request.url); - const query = searchParams.get('q') || ''; + // Accept both 'q' and 'query' parameters for flexibility + const query = searchParams.get('q') || searchParams.get('query') || ''; const category = searchParams.get('category'); const limit = Math.min(Number.parseInt(searchParams.get('limit') || '10'), 50); diff --git a/manual-tools.ts b/manual-tools.ts index 8813acf..9f7ec95 100644 --- a/manual-tools.ts +++ b/manual-tools.ts @@ -816,4 +816,69 @@ export const manualTools: ManualTool[] = [ apiKeyUrl: 'https://app.airweave.ai/settings/api-keys', websiteUrl: 'https://airweave.ai', }, + { + npmPackageName: '@tpmjs/createblogpost', + category: 'text-analysis', + frameworks: ['vercel-ai'], + name: 'createBlogPostTool', + description: + 'Creates structured blog posts with customizable frontmatter, content sections, and SEO metadata. Supports multiple output formats including Markdown and MDX.', + tags: ['blog', 'content', 'writing', 'markdown', 'mdx'], + parameters: [ + { + name: 'title', + type: 'string', + description: 'The title of the blog post', + required: true, + }, + { + name: 'author', + type: 'string', + description: 'The author of the blog post', + required: true, + }, + { + name: 'content', + type: 'string', + description: 'The main content of the blog post', + required: true, + }, + { + name: 'tags', + type: 'string[]', + description: 'Array of tags for categorization', + required: false, + }, + { + name: 'format', + type: "'markdown' | 'mdx'", + description: 'Output format for the blog post', + required: false, + }, + { + name: 'excerpt', + type: 'string', + description: 'Short excerpt or summary of the post', + required: false, + }, + ], + returns: { + type: 'BlogPost', + description: + 'A structured blog post object with frontmatter, content, and metadata including slug, wordCount, readingTime, and formattedOutput', + }, + aiAgent: { + useCase: + '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.', + limitations: + 'Does not include AI content generation - you must provide the content. Only formats and structures existing content.', + examples: [ + 'Create a blog post about TypeScript best practices', + 'Generate a tutorial post with code examples', + 'Format an article with SEO metadata', + ], + }, + websiteUrl: 'https://tpmjs.com', + docsUrl: 'https://tpmjs.com/tool/@tpmjs/createblogpost/createBlogPostTool', + }, ];