Skip to main content
Glama

Generate image

generate_image

Create images from text prompts using OpenAI or Google Gemini; each result saves as a PNG under ~/.polydev/images.

Instructions

Generate an image with OpenAI or Google Gemini. Uses your own API key if you added one at https://www.polydev.ai/dashboard/models; otherwise one image takes one request from your free allowance (provider default model, standard settings). Saves a PNG under ~/.polydev/images.

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
sizeNoImage size (OpenAI with your own key only). Default: 1024x10241024x1024
promptYesDescription of the image to generate (e.g. 'a futuristic dashboard with neon lights', 'logo for a developer tools company')
qualityNoImage quality (OpenAI with your own key only). Default: autoauto
providerNoWhich provider to use (default: gemini)gemini
user_tokenNoPolydev token (starts with pd_). Optional when POLYDEV_USER_TOKEN is set or you have run the login tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, open-world, so the description's job is to add context beyond that — and it does: one image consumes one free request, own keys bypass the allowance, free-tier calls run on provider default model and standard settings, and the PNG is written to ~/.polydev/images. What is missing is whether generation can fail/timeout or how long it typically takes.

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: capability first, cost/auth model second, side effect (file output location) last. Every sentence carries information an agent cannot get from the schema or annotations.

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?

With no output schema, the description correctly compensates by stating that a PNG is saved under ~/.polydev/images. It does not say whether a path or URL is returned in the response, which is the main remaining gap for a tool whose real output is a file.

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 100%, so size, quality, provider and token semantics are already documented, including the 'OpenAI with your own key only' constraint on size and quality. The description reinforces this by explaining that free-allowance calls use provider default model and standard settings, but adds little beyond what the schema already says.

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 first sentence states a specific verb and resource ('Generate an image') and names the two possible backends (OpenAI, Google Gemini). It is unambiguous against siblings like ask_model or list_models, though it never explicitly contrasts with them.

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 context is implied through the billing detail: if you added a key at the dashboard you use your own, otherwise the free allowance is consumed. There is no explicit when-to-use or when-not-to-use guidance, and no mention of what to do if quota runs out or which provider to prefer for which task.

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