Skip to main content
Glama

Generate an image with an AI model (text to image)

generate_image

Generate an image from a text prompt with an image model on this account (text to image); the picture is returned in the chat — no API key needed. Calls a model and is billed to this account like an API call. Image model ids come from list_models. n makes up to 4 at once (default 1) and each one is billed. If the result asks which project to bill, ask the person and call again with projectId.

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": {
      "model": "<model>",
      "prompt": "<prompt>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoHow many images (default 1)
sizeNoe.g. '1024x1024', when the model supports a choice
modelYesAn image model id from list_models
promptYesWhat to draw
projectIdNoOnly when a previous result asked which project to bill

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / projectId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the call is billed to the account like an API call, each of `n` images is billed separately, no API key is required, and the image is delivered in the chat. Annotations only give generic hints (idempotentHint=false, openWorldHint=false); the description supplies the cost and delivery model that actually matter.

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?

Purpose is front-loaded in the first sentence and every sentence carries new information (billing, model source, n behavior, projectId recovery). It is dense and slightly run-on, mixing billing with the error-recovery flow in one paragraph, but nothing is wasted.

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 5-param generation tool with no output schema, the description covers the return value (image in chat), the cost model, where to source the model id, and the project-billing recovery path. An agent has everything needed to invoke it correctly across the normal and ambiguous-billing cases.

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 already 100%, yet the description still adds value: `n` caps at 4 with default 1 and each is billed, and `projectId` is scoped to a re-call after a project-ambiguity result. `size` is left to the schema, which is acceptable given full coverage.

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?

States a specific verb and resource (generate an image from a text prompt with an image model) plus the delivery channel (returned in the chat). No sibling tool does image generation, and the mention of list_models for model ids anchors it in the tool family.

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 the prerequisite for the required `model` param (ids come from list_models) and an explicit recovery path when a result asks which project to bill ("ask the person and call again with `projectId`"). No when-not-to-use guidance, but there is no competing alternative among the siblings to exclude.

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.