Skip to main content
Glama

Сгенерировать изображение

generate_image

Generate or edit images from text prompts and reference inputs via Infergate, then save the files to disk and return their paths and cost.

Instructions

Генерирует изображения через Infergate (POST /images), сохраняет файлы на диск и возвращает пути и стоимость. Платный вызов — списывается с баланса Infergate. Если не знаете id модели, сначала вызовите list_image_models. Для редактирования/генерации по образцу передайте input_images (локальные пути, URL или data: URI).

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
nNoКоличество изображений, 1–10
seedNo
sizeNoНапример 1024x1024 (если модель поддерживает)
extraNoДополнительные поля запроса, передаются как есть
modelYesid модели, например google/gemini-2.5-flash-image
promptYesТекстовое описание изображения
qualityNoНапример low/medium/high (если поддерживается)
output_dirNoКуда сохранить (по умолчанию папка из настроек)
aspect_ratioNoНапример 1:1, 16:9, 9:16
input_imagesNoРеференсы: локальные пути к файлам, http(s) URL или data: URI
output_formatNopng / jpeg / webp (если поддерживается)
filename_prefixNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the call is paid and debits the Infergate balance, that files are written to disk, and that the response includes paths and cost. It omits failure behavior, whether existing files are overwritten, and any rate limits — meaningful gaps for a paid, disk-writing mutation.

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?

Four compact sentences with no filler, and the key facts — what it does, that it costs money, and the model-lookup prerequisite — are front-loaded. The input_images sentence is somewhat redundant with the schema but still earns its place as a usage hint.

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 12-parameter tool with no annotations and no output schema, the description covers the important gaps: cost model, disk side effect, and return values. It leaves error handling, overwrite behavior, and the purpose of output_dir/extra/filename_prefix to the schema, which is acceptable but not 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 83%, so the schema already documents nearly all 12 parameters. The description adds only the model-lookup prerequisite and restates the input_images formats already present in the schema, so it adds little meaning beyond structured fields.

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 (generates images) plus the backend endpoint (POST /images), the side effect (saves files to disk), and the return payload (paths and cost). The resource is inherently distinct from the video/music/speech siblings, so an agent can route to it without opening the schema.

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 explicit conditional guidance: call list_image_models first when the model id is unknown, and pass input_images for editing or reference-based generation. It stops short of stating when NOT to use this tool or naming a non-image alternative, so it is clear context without full exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.