Skip to main content
Glama

Generate an image

generate_image

Create images from text prompts via free Hugging Face Spaces, edit reference pictures, or render legible text. Saves each image with a JSON sidecar of prompt, parameters, seed, and response.

Instructions

Generate an image from a text prompt through a free Hugging Face Space. Writes the image and a .json sidecar with the prompt, the parameters, the seed and the raw Space response. Use klein with reference_images to edit an existing picture, qwen when the image has to carry legible text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoFile name prefix; defaults to the model name.
seedNoSeed; change it for another take.
sizeNoAspect ('16:9') or exact size ('1280x720').1:1
countNoHow many takes to generate.
modelNoWhich Space to use.zimage
promptYesWhat the image should show.
out_dirNoWhere to write the file.out/images
enhance_promptNoqwen only: let the Space rewrite the prompt.
reference_imagesNoklein only: images to edit or restyle.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
logYesWhat the engine printed while it worked.
filesYesEverything that was written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses that the image is written to disk alongside a .json sidecar recording the prompt, parameters, seed and raw Space response, and that generation runs through an external third-party Space. It does not mention failure modes, rate limits or cost, which keeps it out of the top band.

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

Conciseness5/5

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

Two sentences, both load-bearing: the first defines the action and its outputs, the second routes model choice. The file-write behavior and the selection rule are front-loaded with no filler or redundant restatement of the schema.

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?

For a 9-parameter tool the description covers the essentials: what it produces, where it writes, and how to pick a model. An output schema exists so return values need no explanation. The only gap is that it never addresses count (up to 16 takes) or seed variation for multiple generations, and it omits any note about external Space availability or failure.

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 description coverage is 100%, so the baseline is 3, but the description adds genuine meaning on top: it explains which model enum values pair with which parameters (klein + reference_images, qwen + legible text) and reinforces that the sidecar records the seed and parameters. It does not clarify size, count, or out_dir semantics beyond the schema.

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?

States a specific verb + resource (generate an image from a text prompt) and identifies the execution channel (a free Hugging Face Space), which clearly separates it from generate_mesh, generate_audio and synth_sound among its siblings. It also names the artifacts produced (image plus .json sidecar), so the agent knows exactly what the tool yields.

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?

Gives explicit conditional routing between the model options: use klein with reference_images to edit or restyle an existing picture, and qwen when the image must carry legible text. It stops short of stating when not to use this tool at all or naming a sibling alternative, so it is strong on internal selection but has no exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.