Skip to main content
Glama

generate_image

Generate AI images from text prompts and save them to your PKM with customizable size and model choice.

Instructions

Generate an image using AI and save it to the PKM.

Saves to {pkm_root}/outputs/images/YYYY-MM-DD_[slug].png

Args:
    prompt: Description of the image to generate.
    backend: "gemini" (default) or "huggingface"
    model: "flash" (gemini-3.1-flash-preview-image-generation),
           "imagen" (imagen-4.0-generate-001),
           "flux" (FLUX.1-schnell via HuggingFace)
    width: Image width in pixels (default 1024).
    height: Image height in pixels (default 1024).
    output_filename: Optional custom filename (without extension).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
backendNogemini
modelNoflash
widthNo
heightNo
output_filenameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Without annotations, the description carries full transparency burden. It discloses that the file is saved to a specific path, defaults for backend/model/dimensions, and optional filename. This sufficiently informs the agent of side effects (file creation) and configuration, though no mention of permission or rate limits.

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?

The description is structured with a header, output path, and bulleted args. It is slightly verbose due to listing model options inline, but every sentence adds value. Could be more concise by moving model list to a table or reference.

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?

Given the presence of an output schema, the description does not need to detail return values. It explains the output path clearly and covers all parameters. For a tool with 6 params and moderate complexity, this is sufficient, though additional context on backend differences would enhance completeness.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It provides detailed semantics for all 6 parameters, including examples (e.g., model values 'flash', 'imagen', 'flux'), default values, and output path composition, far exceeding the schema's bare titles.

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?

The description clearly states 'Generate an image using AI and save it to the PKM', which specifies the verb (generate), resource (image), and storage location. It distinguishes from sibling tools like list_generated_images by covering creation rather than listing.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives like hybrid text-image tools or external image generators. The description implies it's for AI image generation into PKM, but lacks context for optimal backend/model selection or exclusions.

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/SVerITG/Metis'

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