Skip to main content
Glama

Generate or edit an image

generate_image

Use to create an image from a prompt, or to edit images by passing image_urls. Costs depend on the model (default Nano Banana 2.1: 16 credits at 1K); credits are reserved up front and refunded if it fails. Waits up to ~40 s and usually returns the finished image, which the user also sees in a card. If status is still queued or running, call check_job every 10-20 s.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNo
modelNoImage model id; the default if omitted.
themeNoA brand kit (name, id or 'default') to keep it on brand.
promptYesWhat to make, in plain words.
use_logoNoWith theme: give the model the kit's logo to place.
characterNoA saved Character (name or id) to keep their look.
image_urlsNoSource or reference images (http URLs) to edit or follow.
resolutionNo1k, 2k or 4k where the model offers it.
aspect_ratioNo1:1

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / character
      Added value: +{
      +  "description": "A saved Character (name or id) to keep their look.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, openWorld=true, idempotent=false, destructive=false) by disclosing credit cost, up-front reservation with refund on failure, a ~40 s wait, typical return of the finished image, and that the user sees it in a card. These are exactly the operational facts an agent needs before spending credits on a non-idempotent call.

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?

Four sentences, front-loaded with purpose, then cost, then latency/return, then the async fallback. No sentence repeats the schema or annotations, and every clause carries decision-relevant information.

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 9-parameter, credit-spending, sometimes-async tool with no output schema, the description covers cost, timing, typical return value, and the polling escape hatch. Nothing an agent needs in order to call it correctly and handle the slow path is missing.

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 78%, so the baseline is 3, and the description adds real meaning on top: image_urls switches the tool into edit/reference mode and model choice drives cost. It says nothing about count, aspect_ratio, resolution, or theme behavior, so it stops short of fully compensating.

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?

Names two concrete modes with distinct triggers: creating from a prompt, or editing by passing image_urls. The verb+resource is unambiguous and an agent can tell this apart from siblings like upscale_image or remove_background from the description alone.

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?

Gives an explicit fallback condition: if status is queued or running, poll check_job every 10-20 s, which routes the agent to the right sibling. It does not state exclusions (e.g., when to prefer upscale_image or a different model-selection tool first), so it falls short of full when/when-not 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.