Skip to main content
Glama
mordor-forge

gemini-media-mcp

by mordor-forge

Generate image

generate_image

Create images from a text prompt, optionally guided by up to 14 reference images for subjects, products, or style. Save results for editing or video generation.

Instructions

Create images from a text prompt, optionally guided by up to 14 reference images (subjects, products, style). Default model nb2 (Nano Banana 2.1, $0.04 per 1K image); pro for the densest scenes and final renders ($0.15); nb2-lite for bulk drafts. Returns saved files with URIs you can pass to edit_image, generate_video (image) or other tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of variations to generate in parallel (1-4, default 1). Each is billed.
modelNoModel ID or alias. nb2 (default: Nano Banana 2.1, fast and cheap), pro (Nano Banana Pro, highest fidelity for dense scenes), nb2-lite (cheapest inputs). See list_models.
promptYesWhat to create. Describe subject, setting, composition, lighting and style in full sentences. Put any exact text to render in quotes.
imageSizeNoOutput size: 1K (default), 2K or 4K. Larger costs more. 512 only on the deprecated gemini-3.1-flash-image.
outputNameNoOptional base file name (without extension) for the saved file(s).
aspectRatioNoe.g. 1:1, 3:2, 2:3, 4:3, 3:4, 4:5, 16:9, 9:16, 21:9 (nb2 also 1:4, 4:1, 1:8, 8:1). Defaults to 1:1 when there are no reference images; with them the model usually follows the first image's ratio.
googleSearchNoGround the image in Google Search results (current events, real places, data for infographics).
approvedCostUsdNoOnly needed when a call exceeds the configured confirmation threshold: the cost in USD the user approved.
referenceImagesNoOptional images to guide the result (subjects, products, characters, style): file paths, gemini-media:// URIs from earlier results, or data: URIs. Up to 14 for nb2/pro.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
costYes
textNoCommentary the model returned alongside the image(s)
filesYes
modelYes
warningsNo
groundingNoGoogle Search queries the model ran and the pages it used (googleSearch only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changedv1.1.0
    • addedInput schema / properties / approvedCostUsd
      Added value: +{
      +  "description": "Only needed when a call exceeds the configured confirmation threshold: the cost in USD the user approved.",
      +  "type": "number"
      +}
    • changedInput schema / properties / aspectRatio / description
      Previous value: -"Aspect ratio (1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9)"New value: +"e.g. 1:1, 3:2, 2:3, 4:3, 3:4, 4:5, 16:9, 9:16, 21:9 (nb2 also 1:4, 4:1, 1:8, 8:1). Defaults to 1:1 when there are no reference images; with them the model usually follows the first image's ratio."
    • addedInput schema / properties / count
      Added value: +{
      +  "description": "Number of variations to generate in parallel (1-4, default 1). Each is billed.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / googleSearch
      Added value: +{
      +  "description": "Ground the image in Google Search results (current events, real places, data for infographics).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / imageSize
      Added value: +{
      +  "description": "Output size: 1K (default), 2K or 4K. Larger costs more. 512 only on the deprecated gemini-3.1-flash-image.",
      +  "type": "string"
      +}
    • changedInput schema / properties / model / description
      Previous value: -"Model tier: nb2 (default) or pro. Raw model IDs also accepted"New value: +"Model ID or alias. nb2 (default: Nano Banana 2.1, fast and cheap), pro (Nano Banana Pro, highest fidelity for dense scenes), nb2-lite (cheapest inputs). See list_models."
    • addedInput schema / properties / outputName
      Added value: +{
      +  "description": "Optional base file name (without extension) for the saved file(s).",
      +  "type": "string"
      +}
    • changedInput schema / properties / prompt / description
      Previous value: -"Text description of the image to generate"New value: +"What to create. Describe subject, setting, composition, lighting and style in full sentences. Put any exact text to render in quotes."
    • addedInput schema / properties / referenceImages
      Added value: +{
      +  "description": "Optional images to guide the result (subjects, products, characters, style): file paths, gemini-media:// URIs from earlier results, or data: URIs. Up to 14 for nb2/pro.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • removedInput schema / properties / resolution
      Removed value: -{
      -  "description": "Output resolution (1K, 2K, 4K)",
      -  "type": "string"
      -}
    • addedOutput schema / properties / cost
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "basis": {
      +      "description": "How usd was derived: usage_metadata, unit_params, token_estimate or unpriced",
      +      "type": "string"
      +    },
      +    "breakdown": {
      +      "type": "string"
      +    },
      +    "estimatedUsd": {
      +      "description": "Estimate computed before the call from the price table",
      +      "type": "number"
      +    },
      +    "pending": {
      +      "description": "True while a video job is still running (cost is reserved, not final)",
      +      "type": "boolean"
      +    },
      +    "priceAsOf": {
      +      "type": "string"
      +    },
      +    "usd": {
      +      "description": "Best-known cost in USD; reconciled from token usage when the API reports it",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "estimatedUsd",
      +    "usd",
      +    "basis"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / properties / filePath
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / files
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "bytes": {
      +        "type": "integer"
      +      },
      +      "durationSeconds": {
      +        "type": "number"
      +      },
      +      "height": {
      +        "type": "integer"
      +      },
      +      "mimeType": {
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "path": {
      +        "description": "Absolute path of the saved file on the server's filesystem",
      +        "type": "string"
      +      },
      +      "uri": {
      +        "description": "MCP resource URI; pass it back as an input to other tools or read it with resources/read",
      +        "type": "string"
      +      },
      +      "width": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "uri",
      +      "name",
      +      "mimeType",
      +      "bytes"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / grounding
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Google Search queries the model ran and the pages it used (googleSearch only)",
      +  "properties": {
      +    "queries": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "sources": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "title": {
      +            "type": "string"
      +          },
      +          "uri": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "uri"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    }
      +  },
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • removedOutput schema / properties / mimeType
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / text
      Added value: +{
      +  "description": "Commentary the model returned alongside the image(s)",
      +  "type": "string"
      +}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "filePath",
      -  "model",
      -  "mimeType"
      -]New value: +[
      +  "files",
      +  "model",
      +  "cost"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare non-read-only, open-world, non-idempotent behavior, and the description adds material context beyond that: per-1K pricing for each model (~$0.04 / ~$0.15), the fact that every variation in 'count' is separately billed, and the cost-confirmation threshold that triggers approvedCostUsd. That is genuine cost/behavioral disclosure. It does not cover failure modes or quota limits.

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?

Three sentences, no filler, with the core capability front-loaded before the model/cost guidance and the downstream-chaining note. It is dense rather than padded, though the final sentence mixes return-value and routing information that the output schema partly covers.

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 generative tool with a full output schema and non-trivial cost implications, the description covers capability, cost trade-offs across models, cost-confirmation behavior, and interoperable output URIs. Nothing an agent needs to invoke it correctly is missing, and return-format detail is properly delegated to the output schema.

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 100%, so the baseline is 3. The description still adds meaning the schema lacks: the reference-image limit ('up to 14'), the cost ordering of the three model aliases, and the role of the returned URIs relative to edit_image/generate_video. Payments and billing consequences of 'count' are recast in cost terms rather than just a range.

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+resource ('Create images from a text prompt') and immediately scopes it with the reference-image capability. It clearly distinguishes itself from edit_image and generate_video, which it names as downstream consumers of the returned URIs, so the agent can separate generation from editing without opening a 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 concrete model-selection guidance keyed to use case: nb2 as default, pro for 'densest scenes and final renders', nb2-lite for 'bulk drafts'. It also routes the agent to follow-on tools after generation. It stops short of stating when to prefer this tool over edit_image for an iterative change, so it is clear but not fully exclusive.

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