Skip to main content
Glama

Generate an image

generate_image

Generate an image from a text prompt with optional style, quality, aspect ratio, and negative prompt. Uses 2DAI account credits and returns the result or a queue ID for async polling.

Instructions

Generate an image on the 2DAI account from a text prompt. This SPENDS the account's credit. Returns the finished creation when it lands within the wait budget, otherwise a queueId to poll with check_generation. Style and quality default to "auto" (the server picks by tier).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoBlock until the image is ready (default true). Set false to get a queueId immediately.
styleNoStyle id, or "auto" (default) to let the server choose.
promptYesWhat to generate. Be specific; this drives the whole image.
qualityNoQuality preset id, or "auto" (default) to pick by tier.
allowNSFWNoPermit adult content, if the account allows it.
aspectRatioNoShape of the output. Defaults to 1:1.
negativePromptNoWhat to avoid in the image.
Behavior5/5

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

The description adds valuable behavioral context beyond the annotations: it explicitly warns 'This SPENDS the account's credit' and explains the async return behavior ('Returns the finished creation when it lands within the wait budget, otherwise a queueId to poll with check_generation'). This is exactly the kind of non-obvious behavior an agent needs to know. No contradiction with annotations.

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?

Three sentences, each with a clear purpose: what it does, credit/return behavior, and default behavior. No redundancy or filler. Front-loaded with the core action.

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 the critical operational aspects: credit consumption, synchronous vs. queued return, and default style/quality. Given the 7-parameter schema already documents individual parameters, this is sufficient. It loses one point for not mentioning alternative generation tools (like generate_with_refs) which would help an agent choose among siblings, but within its own scope it is complete.

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?

Schema description coverage is 100%, so the baseline is 3. The description only restates the style and quality defaults that already exist in the schema ('Style and quality default to "auto"'), adding no new parameter semantics. It does not enrich understanding of prompt, wait, allowNSFW, or aspectRatio beyond their schema descriptions.

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 function: 'Generate an image on the 2DAI account from a text prompt.' It identifies a specific verb, resource, and scope. However, it does not explicitly differentiate from sibling tools like generate_with_refs or generate_video, so it stops short of 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 Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives. The description does not mention exclusions or recommend generate_with_refs for reference-based generation, generate_similar for variations, etc. It only describes the action, leaving the agent to infer usage context.

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/2DAICommunity/2dai-mcp-server'

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