z_ai_image_gen_mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZAI_API_KEY | Yes | Your Z.AI API key. Get it from https://z.ai/manage-apikey/apikey-list | |
| ZAI_MAX_RETRIES | No | Max retry attempts | 3 |
| ZAI_RETRY_DELAY | No | Initial retry delay in ms | 1000 |
| ZAI_API_BASE_URL | No | API base URL | https://api.z.ai/api |
| ZAI_DEFAULT_SIZE | No | Default image size | 1280x1280 |
| ZAI_DEFAULT_MODEL | No | Default model | glm-image |
| ZAI_REQUEST_TIMEOUT | No | Request timeout in ms | 60000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_modelsA | List available Z.AI image generation models and their capabilities |
| generate_imageA | Generate an image synchronously from a text prompt. Returns the image URL directly. Use this for most image generation tasks. |
| generate_image_asyncA | Start an asynchronous image generation task. Returns a task ID to poll for results. Use this for long-running generations or when you need to process multiple images. |
| get_async_resultA | Retrieve the result of an asynchronous image generation task. Use the task ID from generate_image_async. |
| download_imageA | Download an image from a URL and return it as base64 or save to a file. Use this after generating an image to get the actual image data. Note: Z.AI image URLs expire after 30 days. |
| generate_and_download_imageA | Generate an image and automatically download it. This combines generate_image and download_image into a single operation. Returns the image as base64 or saves to a file. Best for when you want the image data immediately. |
| list_video_modelsA | List available Z.AI video generation models and their capabilities |
| generate_videoA | Generate a video asynchronously from text or images. Returns a task ID to poll for results. Supports multiple models: CogVideoX-3 (text/image/start-end frame), Vidu Q1 (1080P), Vidu 2 (720P, faster). |
| get_video_resultA | Retrieve the result of an asynchronous video generation task. Use the task ID from generate_video. |
| generate_and_download_videoA | Generate a video and automatically download it. Polls for completion and returns the video file. Best for when you want the video data immediately. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Tools are mostly distinct: image vs video generation, sync vs async, and combined download operations. However, there is some overlap between generate_image_async+get_async_result and generate_image (sync), but descriptions clarify usage.
Names follow a mostly consistent verb_noun pattern (e.g., list_models, generate_image). A minor inconsistency: 'get_async_result' is ambiguous (could be image or video), but the complementary 'get_video_result' helps. Compound names like 'generate_and_download_image' break the pattern slightly.
10 tools cover the core workflows for image and video generation without being excessive. Each tool has a clear purpose, and the number is well-scoped for the domain.
Covers essential operations: model listing, generation (sync/async), result retrieval, and download. Lacks a synchronous video generation option and management tools (e.g., list/cancel tasks), but the main generation pipeline is complete.