generate_image_with_ai
Create custom images for social media content using AI by providing a text description. This tool helps users generate visual assets to enhance their posts and engagement.
Instructions
Generate an image from a text description using RecurPost AI
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt_text | Yes | Detailed description of the image to generate |
Implementation Reference
- src/index.ts:525-542 (handler)Registration and handler logic for the 'generate_image_with_ai' tool. It uses the 'callAPI' helper to send a request to the '/api/generate_image_with_ai' endpoint.
server.tool( "generate_image_with_ai", "Generate an image from a text description using RecurPost AI", { prompt_text: z .string() .describe("Detailed description of the image to generate"), }, async (params) => { try { return toolResult( await callAPI("/api/generate_image_with_ai", params) ); } catch (e) { return toolResult({ error: String(e) }, true); } } );