Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OUTPUT_DIRNoDirectory where generated images will be saved./output
BACKEND_TYPENoThe backend type for generationcomfyui
COMFYUI_HOSTNoThe host address for ComfyUI server127.0.0.1
COMFYUI_PORTNoThe port for ComfyUI server8188
UNITY_ASSETS_DIRNoPath to Unity project assets directory for export
COMFYUI_CHECKPOINTNoThe Stable Diffusion checkpoint file to usesd_xl_base_1.0.safetensors

Tools

Functions exposed to the LLM to take actions

NameDescription
ping

Check if the MCP server and backend are healthy.

Returns: Status message indicating server and backend health
list_available_presets

List all available style presets for asset generation.

Returns: JSON object containing all presets with their configurations
generate_sprite

Generate a single game sprite from a text description.

Args: prompt: Description of the sprite to generate (e.g., "a blue slime monster") preset: Style preset to use (default, pixel_16, pixel_32, flat_ui, handpainted, etc.) width: Override width in pixels height: Override height in pixels negative_prompt: Additional things to avoid (appended to preset's negative prompt) seed: Random seed for reproducibility steps: Number of generation steps (more = higher quality but slower) save_to_file: Whether to save the image to disk filename: Custom filename (auto-generated if not provided) Returns: JSON with base64 image data and metadata
generate_icons

Generate multiple game icons from a list of descriptions.

Args: prompts: List of icon descriptions (e.g., ["sword", "shield", "potion"]) preset: Style preset to use (default: icon). Options: icon, icon_item, flat_ui size: Icon size in pixels (square) seed: Base seed for reproducibility (each icon gets seed+index) create_atlas: Whether to combine icons into a single spritesheet save_to_file: Whether to save images to disk Returns: JSON with base64 images for each icon and optional atlas
generate_tileset

Generate a set of tileable game tiles.

Args: theme: Overall theme for the tileset (e.g., "forest", "dungeon", "sci-fi") tile_types: List of tile types to generate (e.g., ["ground", "wall", "water"]) preset: Style preset to use (default: tileset). Options: tileset, topdown_tile tile_size: Size of each tile in pixels (square) seed: Base seed for reproducibility (each tile gets seed+index) save_to_file: Whether to save images to disk Returns: JSON with base64 images for each tile type
generate_character

Generate character sprites with optional multiple poses.

Args: description: Character description (e.g., "a knight in silver armor") poses: List of poses to generate (e.g., ["idle", "walking", "attacking"]) preset: Style preset to use (default: character). Options: character, character_portrait, pixel_character width: Sprite width in pixels height: Sprite height in pixels seed: Base seed for reproducibility (each pose gets seed+index) steps: Override generation steps (higher = better quality but slower) save_to_file: Whether to save images to disk Returns: JSON with base64 images for each pose
generate_character_animations

Generate multiple character poses with consistent identity using img2img.

This tool takes a reference character image and generates variations with different poses while maintaining the same character identity (outfit, colors, style). Args: reference_image_base64: Base64 encoded reference character image (front/idle view) description: Character description (e.g., "a knight in silver armor") poses: List of poses to generate (e.g., ["walking", "attacking", "jumping"]) denoise: How much to change from reference (0.2=very similar, 0.5=more different). Default 0.35 seed: Random seed for reproducibility (same seed = same variations) preset: Style preset to use (default: character) pose_denoise_boost: Additional denoise for action poses (default: 0.25) save_to_file: Whether to save images to disk Returns: JSON with base64 images for each pose, all maintaining character identity Example workflow: 1. First generate a base character with generate_character(description, poses=["idle"]) 2. Take the best result's image_base64 as reference_image_base64 3. Call this tool with poses=["walking", "running", "attacking"]
generate_with_viewpoint

Generate a game asset with precise camera viewpoint control using ControlNet.

This tool uses depth maps to guide the generation, ensuring consistent camera angles like top-down, side view, front view, etc. Args: prompt: Description of the asset to generate (e.g., "a wooden barrel") view_type: Camera angle - "topdown", "side", "front", "3/4" shape: Object shape hint - "flat", "sphere", "cylinder", "box" preset: Style preset to use (default: topdown_prop) controlnet_model: ControlNet model (default: diffusers_xl_depth_full.safetensors) control_strength: How strongly to follow viewpoint (0.0-1.0, default: 0.8) width: Output width in pixels height: Output height in pixels seed: Random seed for reproducibility save_to_file: Whether to save the image to disk Returns: JSON with base64 image data and metadata Note: Requires ControlNet models installed in ComfyUI. Common depth models: - diffusers_xl_depth_full.safetensors (SDXL) - control_v11f1p_sd15_depth.pth (SD1.5)
generate_topdown_asset

Simplified tool to generate top-down 2D game assets with guaranteed viewpoint.

This is a convenience wrapper around generate_with_viewpoint specifically for top-down games (RPG, strategy, etc.). Args: prompt: Description of the asset (e.g., "wooden treasure chest", "stone well") asset_type: Type of asset - "prop", "character", "creature", "tile", "effect" size: Output size in pixels (square) control_strength: How strictly to enforce top-down view (0.5-1.0) seed: Random seed for reproducibility save_to_file: Whether to save the image to disk Returns: JSON with base64 image data
process_image

Apply post-processing operations to an image.

Args: image_base64: Base64 encoded input image operations: List of operations to apply: "resize", "remove_background", "add_outline" resize_width: Target width for resize operation resize_height: Target height for resize operation outline_color: Hex color for outline (e.g., "#000000") outline_thickness: Thickness of outline in pixels save_to_file: Whether to save processed image to disk Returns: JSON with processed image as base64
create_sprite_atlas

Combine multiple images into a sprite atlas/spritesheet.

Args: images_base64: List of base64 encoded images columns: Number of columns in the atlas padding: Padding between sprites in pixels save_to_file: Whether to save atlas to disk filename: Custom filename for the atlas Returns: JSON with the combined atlas as base64
export_to_unity

Export a generated asset directly to a Unity project.

Args: image_base64: Base64 encoded image to export asset_name: Name for the asset file (without extension) asset_type: Unity folder type (Sprites, Textures, UI, etc.) subfolder: Optional subfolder within the asset type folder Returns: JSON with export status and file path
batch_generate

Generate multiple assets in batch from a list of prompts.

Args: prompts: List of asset descriptions preset: Style preset to use for all generations width: Override width for all assets height: Override height for all assets seed: Base seed for reproducibility (each prompt gets seed+index) save_to_file: Whether to save all images to disk Returns: JSON with all generated assets

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/tuannguyen14/ComfyAI-MCP-GameAssets'

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