Skip to main content
Glama

generate_image

Generate production image assets from text prompts with OpenAI, saving to a specified file path for use in banners, icons, and backgrounds.

Instructions

เจนรูปใหม่จากข้อความ (prompt) ด้วย OpenAI gpt-image-2 แล้วเซฟเป็นไฟล์ที่ output_path ที่สั่ง (สร้างโฟลเดอร์ให้อัตโนมัติ, path relative จะอิงโฟลเดอร์โปรเจกต์ปัจจุบัน). ใช้สำหรับผลิต asset จริงเพื่อเอาไปใช้ในงาน เช่น banner เว็บ, ไอคอน, พื้นหลัง, texture. เลือกคุณภาพได้ (quality) — low ร่างถูกสุด, high งาน final. คืนแค่ path + metadata ไม่คืนข้อมูลรูปดิบ.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoจำนวนรูป (default 1). ถ้า >1 จะเซฟเป็น name-1.ext, name-2.ext, ...
sizeNoauto | 1024x1024 (จตุรัส) | 1536x1024 (แนวนอน) | 1024x1536 (แนวตั้ง) | 2048x2048 | WxH (gpt-image-2 สูงสุด 3840px, ทวีคูณของ 16)1024x1024
modelNoโมเดล (default gpt-image-2). override ได้ เช่น gpt-image-1.5gpt-image-2
formatNoนามสกุลไฟล์ผลลัพธ์ (ไม่ใส่ = เดาจาก output_path, ไม่รู้ = png)
promptYesคำอธิบายรูปที่ต้องการ (อังกฤษได้ผลดีสุด, ไทยก็ได้)
qualityNoคุณภาพ/ราคา: low (ร่าง, ถูกสุด) | medium (ค่าเริ่มต้น) | high (งาน final, แพงสุด) | automedium
backgroundNotransparent = พื้นหลังโปร่งใส (ใช้ได้เฉพาะ png/webp) | opaque | autoauto
moderationNoระดับ moderation (default auto)auto
compressionNoระดับบีบอัด 0-100 (เฉพาะ jpeg/webp)
output_pathYesที่จะเซฟไฟล์ เช่น public/images/banner.png หรือ /abs/path/icon.webp
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that it returns only path+metadata, not raw data, and mentions auto-creation of folders. However, it does not address overwrite behavior or rate limits.

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?

The description is concise, well-structured, and front-loaded with the primary purpose. Every sentence adds value without redundancy.

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?

Given the tool's complexity (10 parameters, no output schema), the description covers key behaviors: return format, parameter interactions, quality differences, and file handling. It provides sufficient context for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds significant value beyond the schema: explains how 'n' affects filenames, size options including auto, quality levels, format inference, background restrictions, and compression applicability.

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?

The description clearly states the verb (generate), resource (images from prompt using gpt-image-2), and provides specific use cases (banners, icons, textures). It distinguishes from the sibling tool edit_image by focusing on creation.

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?

The description provides context for when to use this tool (producing actual assets) but does not explicitly exclude alternatives or mention when not to use it. The sibling differentiation is implicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/k12club/image-gen-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server