Skip to main content
Glama

Generate Image

generate_image

Generate an image from a text prompt, upload it to Firebase Storage, and return a signed download URL, compressing only when needed and avoiding local disk storage.

Instructions

Generate an image from a text prompt, upload it to Firebase Storage, and return a signed download URL. The image is compressed only if it exceeds the size limit. Nothing is written to local disk and the image is not returned inline.

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

Input Schema

NameRequiredDescriptionDefault
promptYesDetailed description of the image to generate
resolutionNoSource resolution: '1K' (default), '2K', or '4K'. Final file is always compressed to stay small
aspect_ratioNoAspect ratio, e.g. '1:1', '16:9', '9:16', '4:3'. Defaults to 1:1
inline_previewNoWhether to include an inline image preview in the response. Defaults to the server's NANO_BANANA_INLINE_PREVIEW setting. Set false to return the URL only (smaller, faster response).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so well: it discloses that output goes to Firebase Storage, a signed URL is returned, nothing touches local disk, and the image is not returned inline. It omits auth requirements, rate limits, and latency/cost expectations, which keeps it short of a 5.

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?

Three tight sentences: the operation and return value come first, then the compression rule, then the storage/inline constraints. No filler and no repetition of the schema.

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, no-output-schema tool, the description covers the return value (signed URL), storage side effects, and the inline-preview default well enough to call it correctly. Missing only operational context like auth or failure modes.

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 baseline is 3, but the description adds real meaning beyond the schema by explaining that compression is conditional on exceeding the size limit and that the image is not returned inline — clarifying the practical tradeoff behind resolution and inline_preview.

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?

The description states a specific verb and resource ("Generate an image from a text prompt") and adds the full pipeline: upload to Firebase Storage and return a signed download URL. It does not differentiate from siblings like generate_image_batch or edit_image, but the verb+resource pairing is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied by the operation itself — an agent can infer this is the tool for creating a single image from a text prompt — and the note "Set false to return the URL only (smaller, faster response)" gives a decision cue for inline_preview. However, there is no explicit when-to-use versus alternatives such as edit_image or generate_image_batch, and no stated prerequisites.

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