Skip to main content
Glama
jonchun

Gemini Image Generator MCP Server

by jonchun

transform_image_from_file

Transform an image file using Gemini and a text prompt, optionally saving the generated image to a directory.

Instructions

Transform an image file using Gemini.

Args: image_file_path: Path to the source image file. prompt: Text description of desired transformation. output_dir: Optional directory to save the generated image. If not provided, the image is only returned in the response (not saved to disk). model: Optional Gemini model name. If not provided, uses GEMINI_MODEL environment variable. ctx: Optional context for progress reporting.

Returns: List containing ImageContent with the transformed image, and optionally TextContent with file path if saved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
promptYes
output_dirNo
image_file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does disclose meaningful behavior: the image is only returned in the response unless output_dir is supplied, and the model falls back to the GEMINI_MODEL environment variable. It omits error behavior, cost/latency, and whether an existing file at the target path is overwritten, but this is solid disclosure for a no-annotation tool.

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 docstring is front-loaded with the purpose in one line, then structured Args/Returns sections. Slightly verbose in formatting but every parameter line carries distinct information with no filler.

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 4-parameter tool with no annotations and 0% schema coverage, the description covers inputs and return shape; an output schema exists so return details are partly redundant but helpful. The main gaps, sibling routing guidance and error/format handling, are the only omissions.

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 description coverage is 0%, so the description must compensate, and it documents all four parameters with semantics: image_file_path as source path, prompt as transformation text, output_dir's save-vs-return consequence, and model's env-var fallback. It does not specify accepted image formats, path constraints, or whether output_dir must exist.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Transform an image file using Gemini') that clearly distinguishes it from transform_image_from_encoded (which takes encoded input) and generate_image_from_text (which creates rather than transforms). Differentiation comes implicitly from the name and the input-concept rather than an explicit sibling callout, so it stops just short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose this tool over its siblings, e.g. 'use this when you have a path on disk; use transform_image_from_encoded when you have base64 data.' The agent must infer the routing decision entirely from the title.

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