Skip to main content
Glama
posteverywhere

@posteverywhere/mcp

Official

generate_image

Generate AI images from text prompts and save them to your media library for use in social media posts. Choose from four models based on quality and cost. Requires AI scope.

Instructions

Generate an AI image from a text prompt on PostEverywhere. The image is saved to your media library and can be attached to posts via media_ids. Choose from 4 models: nano-banana-pro (best quality, 15 credits), ideogram-v2 (best for text-in-image, 8 credits), gemini-3-pro (balanced, 5 credits), flux-schnell (fastest, 1 credit). Requires the "ai" scope on your API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesText description of the image to generate
aspect_ratioNoAspect ratio for the generated image1:1
modelNoAI model to use for generationnano-banana-pro

Implementation Reference

  • src/tools.ts:217-231 (registration)
    The 'generate_image' tool is registered using server.tool() in the registerTools function. It defines the tool name, description, input schema (prompt, aspect_ratio, model), and the handler callback.
    server.tool(
      'generate_image',
      'Generate an AI image from a text prompt on PostEverywhere. The image is saved to your media library and can be attached to posts via media_ids. Choose from 4 models: nano-banana-pro (best quality, 15 credits), ideogram-v2 (best for text-in-image, 8 credits), gemini-3-pro (balanced, 5 credits), flux-schnell (fastest, 1 credit). Requires the "ai" scope on your API key.',
      {
        prompt: z.string().max(2000).describe('Text description of the image to generate'),
        aspect_ratio: z.enum(['1:1', '16:9', '9:16', '4:3', '3:4', '4:5', '5:4']).optional().default('1:1').describe('Aspect ratio for the generated image'),
        model: z.enum(['nano-banana-pro', 'ideogram-v2', 'gemini-3-pro', 'flux-schnell']).optional().default('nano-banana-pro').describe('AI model to use for generation'),
      },
      async ({ prompt, aspect_ratio, model }) => {
        const result = await client.generateImage({ prompt, aspect_ratio, model });
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
        };
      }
    );
  • The handler function for 'generate_image' that receives {prompt, aspect_ratio, model} and delegates to client.generateImage(), returning the JSON-stringified result.
    async ({ prompt, aspect_ratio, model }) => {
      const result = await client.generateImage({ prompt, aspect_ratio, model });
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
      };
    }
  • Input schema defined with Zod: prompt (string, max 2000), aspect_ratio (enum, optional, default '1:1'), model (enum, optional, default 'nano-banana-pro').
    {
      prompt: z.string().max(2000).describe('Text description of the image to generate'),
      aspect_ratio: z.enum(['1:1', '16:9', '9:16', '4:3', '3:4', '4:5', '5:4']).optional().default('1:1').describe('Aspect ratio for the generated image'),
      model: z.enum(['nano-banana-pro', 'ideogram-v2', 'gemini-3-pro', 'flux-schnell']).optional().default('nano-banana-pro').describe('AI model to use for generation'),
    },
  • The client method generateImage() on PostEverywhereClient that sends a POST request to /ai/generate-image with the prompt, aspect_ratio, and model body. Returns a Promise with media_id, model, aspect_ratio, credits_used, credits_remaining, and message.
    async generateImage(body: {
      prompt: string;
      aspect_ratio?: string;
      model?: string;
    }): Promise<{ media_id: string; model: string; aspect_ratio: string; credits_used: number; credits_remaining: number; message: string }> {
      return this.request('POST', '/ai/generate-image', body);
    }
Behavior4/5

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

Discloses generation, media library storage, scope requirement, and credit costs; no annotations complement, but description adequately covers main effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with model list, but could be slightly more concise without losing information.

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?

No output schema, but description implies result usage (media_ids); covers key aspects for a generation tool with 3 parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage, but description adds valuable context about model quality and credit costs, enhancing parameter understanding.

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 it generates an AI image from text prompt, saves to media library, and distinguishes from sibling CRUD tools.

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

Usage Guidelines4/5

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

Explicitly lists model trade-offs and required 'ai' scope, but does not provide when-not-to-use or alternative scenarios.

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/posteverywhere/mcp'

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