Skip to main content
Glama

generate_image

Creates images from text prompts on Perchance's lite engine. Supports negative prompts, resolutions, art styles, seeds, and guidance scale, then saves the image and returns its saved path.

Instructions

Generate an image via lite mode (curl_cffi + external solver).

Memory: 80-120MB (no browser). If SOLVER_URL set, calls solver service (Byparr/Camoufox) that does Turnstile solving (200MB) on separate Render account. If no solver, requires PERCHANCE_USER_KEY env var (64 hex from browser).

Args: prompt: What to draw negative_prompt: Things to avoid seed: -1 random or specific int resolution: 512x512, 512x768, 768x512, 768x768 guidance_scale: 1-30 default 7 art_style: Optional style from list_styles save_path: Where to save (default auto)

Returns JSON with saved_path, seed, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
promptYes
art_styleNo
save_pathNo
resolutionNo512x512
guidance_scaleNo
negative_promptNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/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 well by disclosing memory usage (80-120MB), solver delegation behavior, required environment variables, and that it returns JSON. It does not mention rate limits, cost, or file overwrite behavior, but the core behavioral traits are transparent.

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 well-structured: a lead sentence, environment notes, an Args list, and a return note. It is slightly dense with technical jargon like 'curl_cffi' and 'Byparr/Camoufox', but each sentence contributes useful information and there is no filler.

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?

The description covers prerequisites, parameter meanings, and return behavior. Since an output schema exists, detailed return documentation is not necessary. It lacks error handling, rate limits, and how to obtain PERCHANCE_USER_KEY, but overall it is sufficient for a 7-parameter tool with no annotations.

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, and it does thoroughly. Every parameter is explained: prompt, negative_prompt, seed semantics, resolution allowed values, guidance_scale range, art_style source, and save_path default. This fully bridges the schema gap.

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?

The description clearly states the tool's action ('Generate an image') and specifies the mode ('lite mode'), which distinguishes it from a generic image tool. It references list_styles as a source for art_style, but it does not explicitly contrast with the sibling generate_batch, so it is not a full 5.

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?

The description provides useful environmental context: when SOLVER_URL is set, a solver service is used; otherwise PERCHANCE_USER_KEY is required. However, it gives no explicit guidance on when to choose this tool over generate_batch or other siblings, leaving the selection logic mostly implied.

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