Skip to main content
Glama

Generate an image from references

generate_with_refs

Generate images from prior creations using face-ref, character-ref, style-transfer, or smart-edit. Preserve identity or style, edit an image, spend credit, and get the result or a queueId.

Instructions

Generate an image conditioned on existing creations. This SPENDS the account's credit. Four tools: "face-ref" keeps a face identity across new scenes (1-6 refs), "character-ref" keeps a whole character consistent (1-6 refs), "style-transfer" extracts the STYLE of the refs (1-3) and applies it to the prompt, "smart-edit" EDITS refs[0] following the prompt as the edit instruction (up to 3 extra support refs, 4 total). Reference ids come from earlier generations, upload_image or list_creations. Returns the finished creation within the wait budget, else a queueId for check_generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYesWhich reference tool to run.
waitNoBlock until ready (default true). Set false to get a queueId immediately.
promptNoThe scene to generate. Optional for style-transfer (the refs carry the style). For smart-edit this is the edit instruction and is required.
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.
refCreationIdsYesCreation ids to condition on. face/character-ref: 1-6 identity shots. style-transfer: 1-3 style sources. smart-edit: refs[0] = the image to EDIT, plus up to 3 support refs.
extractionDirectiveNostyle-transfer only — what to extract from the refs (default "style").
Behavior4/5

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

The description discloses a critical behavioral trait not fully captured by annotations: 'This SPENDS the account's credit.' It also explains the synchronous/asynchronous return behavior ('within the wait budget, else a queueId for check_generation'), which is useful operational context beyond the readOnlyHint=false annotation.

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 a single dense paragraph but each sentence contributes unique information: main purpose, credit cost, sub-tool breakdown, reference source, and return behavior. It is front-loaded with the headline action and remains readable for a tool with this complexity.

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 complex tool with 8 parameters and no output schema, the description explains the return contract, credit cost, sub-tool semantics, and reference id sourcing. It does not spell out every parameter nuance, but the schema already covers those; the description fills the behavioral gaps that matter for invocation.

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?

Even though the schema describes all 8 parameters, the description adds valuable relational semantics: it explains how refCreationIds count varies by sub-tool (1-6 for face/character, 1-3 for style, 4 for smart-edit) and that prompt is optional for style-transfer but required for smart-edit. This goes beyond the static schema definitions.

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 first sentence immediately states the core action: 'Generate an image conditioned on existing creations.' It then enumerates four distinct sub-modes (face-ref, character-ref, style-transfer, smart-edit) with precise behavior for each, making it unmistakable what this tool does and how it differs from its siblings.

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?

The description gives clear guidance on when to use each sub-tool: face identity, character consistency, style extraction, and smart editing. It also tells users where reference ids come from ('earlier generations, upload_image or list_creations') and clarifies prompt requirements per mode. It does not explicitly say 'use this instead of generate_image' or list when-not-to-use, but the context is strong.

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