Skip to main content
Glama

Kleap

Generate Image

generate_image
Destructive

Put a REAL photo or illustration on the site by describing it — no image bytes to send. Give a vivid prompt and a public/ path (e.g. public/hero.jpg); Kleap generates it with Cloudflare FLUX.2 and stores it as a proper binary asset, exactly like write_files with encoding:"base64" but with NO base64 to transmit (a real image's base64 is too big for a model to emit reliably — this is the ONLY dependable way to add a generated picture). Use it for hero photos, section illustrations, onboarding images, OG images, or to replace a broken/ugly image. Square 768×768 by default; pass width/height (256–1440) for other ratios; hd:true uses the premium model (sharper, slower). ⚠️ To REPLACE an existing image, generate to a NEW filename (e.g. hero-2.jpg) and point the markup at it — overwriting the same path can be served stale from CDN/R2 cache. After it returns, call publish_app to deploy it live.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hdNotrue = premium model (flux-2-dev): sharper, slower. Default = fast klein model.
pathYespublic/ image path to create, ending .png/.jpg/.jpeg/.webp (e.g. public/hero.jpg). Use a NEW name to replace an image.
widthNoPixel width 256–1440 (default 768).
app_idYesThe app ID
heightNoPixel height 256–1440 (default 768).
promptYesVivid description of the image to generate (subject, mood, lighting, style).
contextYesWhy this call, in one short sentence. Used to improve the connector; never include credentials or personal data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
sizeNo
bytesNo
modelNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description explains the underlying model (Cloudflare FLUX.2), the binary-asset behavior, default size, hd mode, and a critical caching pitfall when overwriting paths. It adds substantial behavioral context beyond the annotations, and does not contradict destructiveHint=true.

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?

Although dense, every sentence earns its place: core behavior, defaults, use cases, a critical warning, and post-call deployment. The most important distinction is front-loaded, and the risk warning is clearly highlighted.

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?

For a tool with 7 parameters IMPORTANT and an output schema, the description covers purpose, parameters, behavioral quirks, deployment follow-up, and the main failure mode. An agent has enough context to call this tool correctly without guessing.

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 coverage is 100%, so the schema carries a lot of the parameter meaning. The description still adds value by explaining path replacement semantics, the 256–1440 range, and what hd:true means in practice, all of which help the agent use parameters correctly.

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 tool generates a real image asset from a text prompt, with the distinguishing notion that no image bytes need to be sent. It also contrasts with write_files, making it easy for an agent to pick the right tool.

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?

It explicitly lists use cases (hero photos, illustrations, OG images, replacing broken images) and distinguishes this tool from write_files, noting this is the only dependable way to add a generated image. It also instructs to call publish_app afterward, which is actionable guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.