Skip to main content
Glama

Generate Image

generate_image

Generate an image from a text prompt, save it locally with a unique filename, and return the file path and source URL. Use edit_image for reference-image transformations.

Instructions

Generate an image from a text prompt with flux-2-klein (NaN API). Use edit_image instead when you already have reference images to transform. Saves each image under NAN_OUTPUT_DIR (default ~/nan-mcp-output) and never overwrites: a taken name gets -2, -3, and so on. Returns the saved path and the temporary source URL. Counts against the account image quota (100/month).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images to generate (1-4). Default 1. Each one counts against the monthly quota
seedNoBase seed for reproducibility
sizeNoImage size "WxH" divisible by 16, e.g. 1024x1024, 1536x1024, 1024x1536. Default 1024x1024
promptYesTextual description of the image to generate
guidanceNoFLUX guidance scale
outputNameNoOptional base name for the output file(s). Sanitised to a safe filename; an existing name is never overwritten

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.0
    • changedInput schema / properties / n / description
      Previous value: -"Number of images to generate (1-4). Default 1"New value: +"Number of images to generate (1-4). Default 1. Each one counts against the monthly quota"
    • changedInput schema / properties / outputName / description
      Previous value: -"Optional base name for the output file(s)"New value: +"Optional base name for the output file(s). Sanitised to a safe filename; an existing name is never overwritten"
  2. First observedv1.0.6

TDQS

A4.5/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It explains output directory (NAN_OUTPUT_DIR), the never-overwrite naming behavior (appending -2, -3), the return value (saved path and temporary URL), and quota implications (100/month). It does not mention rate limits or auth, but the disclosed behaviors are substantial and go beyond simple statements.

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?

The description is two sentences long, highly efficient, and front-loaded. The first sentence states the core function, the second provides routing guidance and key operational details (output path, overwrite behavior, return value, quota). Every clause earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (six parameters, but all well-documented in the schema) and the absence of an output schema, the description provides complete context: what it does, when to use it, where outputs are saved, how naming conflicts are handled, what is returned, and quota impact. Nothing an agent needs to invoke it correctly is missing.

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

Parameters3/5

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

The input schema has 100% description coverage for all six parameters, so the baseline is 3. The description does not add significant new meaning beyond the schema; it merely repeats that each generated image counts against the quota (already stated in the n parameter) and that output names are sanitized (already in outputName). This is adequate but not additive.

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 the primary function: generating an image from a text prompt using a specific model (flux-2-klein). It uses a specific verb ('generate'), a specific resource ('image'), and names the input (text prompt). It also distinguishes itself from the sibling tool edit_image by explicitly stating when edit_image should be used instead, which differentiates the purpose.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool versus the alternative: 'Use edit_image instead when you already have reference images to transform.' This provides clear routing guidance and leaves no ambiguity about which tool to select for different scenarios.

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