Skip to main content
Glama

generate_image

Generate an image from a text prompt on a remote server and save it as a local PNG file, receiving the file path in response.

Instructions

Generate an image from a text prompt on the remote server.

The image is saved as a local PNG file; the returned text includes the absolute path of the saved file.

Args: prompt: Text description of the image to generate. model: Model id (from list_models). Defaults to MLX_SERVE_IMAGE_MODEL (or the built-in default if unset). size: Output dimensions, e.g. "512x512" or "1024x1024". seed: Optional random seed for reproducibility. steps: Sampling steps (backend-specific). cfg_scale: Classifier-free guidance scale (SDXL/Flux style). guidance_scale: Guidance scale (MAGE-Flow style).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
sizeNo
modelNo
stepsNo
promptYes
cfg_scaleNo
guidance_scaleNo
Behavior4/5

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

With no annotations, the description carries the disclosure burden. It explicitly mentions that the tool saves a PNG file and returns its absolute path. It omits details like overwrite behavior or file lifetime, but the core side effect is visible.

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?

The description is front-loaded with purpose and output behavior, followed by a compact and structured Args block. Every line adds value and the length is justified by the need to document seven parameters with no schema-level descriptions.

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?

Given that there is no output schema, the description correctly covers both the file-saving behavior and the returned absolute path. It also documents defaults and tuning parameters. It could be slightly more complete on routing to alternatives and file overwrite behavior, but an agent has enough to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does thoroughly. The Args section explains all seven parameters, including the model default, example sizes, meaning of seed, backend-specific steps, and the distinction between cfg_scale and guidance_scale.

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 opens with a specific verb and resource: 'Generate an image from a text prompt on the remote server.' It also states the key output behavior (saved as PNG, returned path), which distinguishes it from siblings like text_to_speech, generate_video, and edit_image.

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 clearly frames the text-to-image generation use case and points to list_models as the source for model ids. It does not explicitly say 'use edit_image instead for existing images,' but the context of generating from a text prompt is clear enough for correct tool selection.

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/Congenital/mlx-serve-mcp'

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