Skip to main content
Glama

generate_image

Generate AI images and save them to your personal knowledge management system. Supports Gemini and HuggingFace backends with multiple models.

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
Behavior3/5

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

Without annotations, the description carries the burden of behavioral disclosure. It explains the save location and default parameter values, but does not mention any side effects, authentication requirements, rate limits, or whether the operation is reversible. For a content creation tool, more transparency about potential limitations or safety would be beneficial.

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 relatively concise with a single introductory sentence followed by a bullet-like list of arguments. It is front-loaded with the main purpose. Minor issue: the list could be formatted more clearly, but overall it is efficient and each line adds value.

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 tool has 6 parameters (1 required) and an output schema exists, the description covers the input parameters thoroughly and specifies the output file path. It does not describe return values, but that's acceptable since an output schema is present. The description is complete for practical use.

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 fully compensates. It lists all 6 parameters with clear explanations, default values, and examples (e.g., model options with specific identifiers). This adds significant meaning beyond the basic schema, enabling correct tool usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Generate an image using AI and save it to the PKM', specifying verb and resource. It also details the save path. However, it does not explicitly distinguish this tool from sibling image-related tools like list_generated_images, though the purpose is sufficiently clear.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. The description lacks context about appropriate use cases, prerequisites, or which backend/model to choose for different scenarios. It simply describes what the tool does without usage recommendations.

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_PH'

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