Skip to main content
Glama

generate_mock_asset

Generates custom mock 2D PNG assets for game prototypes, with gradients, patterns, rotated text, and transparency. Embeds JSON metadata for later inspection.

Instructions

Generates a single advanced custom mock 2D PNG asset (supports gradients, patterns, text rotation, transparency, and auto-scaling) for game prototypes. Embeds JSON metadata into the PNG (dimensions, color, shape, description) readable by read_image_metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to display on the asset
colorYesBackground hex color code, e.g., '#FF5733'
shapeNoThe geometric shape of the asset. Default is rectangle when missing.rectangle
widthNoWidth in pixels. Default is 128 when missing.
heightNoHeight in pixels. Default is 128 when missing.
opacityNoOpacity of the background shape from 0.0 (transparent) to 1.0 (opaque). Default is 1.0 when missing.
patternNoOptional pattern overlay. Default is none when missing.none
filenameYesName of the file, e.g., 'player_idle.png'
fillModeNoBackground fill mode. Default is solid when missing.solid
fontSizeNoOptional explicit font size in pixels. If omitted, it auto-scales to fit.
directoryYesAbsolute path to the target project folder
textColorNoOptional hex color for the text. If omitted, a contrasting color (black or white) will be automatically calculated based on the background.
trackColorNoBackground color for the unfilled portion of the asset when fillPercent < 100. Hex code, e.g., '#333333'
fillPercentNoPercentage of the asset to fill, useful for health or progress bars (0-100). Default is 100.
strokeColorNoColor of the asset border hex code. Default is #000000 when missing.#000000
strokeWidthNoWidth of the asset border in pixels. Set to 0 for no border. Default is 4 when missing.
patternColorNoPattern color. If omitted, a derived contrast color will be used.
patternScaleNoPattern tile size in pixels. Default is 16 when missing.
textPositionNoVertical alignment of the text. Default is center when missing.center
textRotationNoRotation angle for the text in degrees. Default is 0 when missing.
gradientAngleNoAngle for linear gradients in degrees. Ignored for radial gradients. Default is 45 when missing.
patternOpacityNoPattern overlay opacity from 0.0 to 1.0. Default is 0.18 when missing.
secondaryColorNoSecondary color used for gradients. If omitted, a derived variant of color will be used.
assetDescriptionNoHuman-readable description of this asset stored as image metadata. Useful for models without vision to understand the asset later. E.g. 'Player idle placeholder, blue rectangle 128x128'
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses several behavioral features (gradients, patterns, text rotation, transparency, auto-scaling) and mentions that JSON metadata is embedded in the PNG. It does not discuss file overwrite behavior or directory handling, but the core generation behavior is transparent.

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 exactly two sentences, front-loaded with the action verb. It packs capabilities into a compact list and explains the metadata integration without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 24 parameters and no output schema, the description is adequate but has gaps. It provides context about game prototyping and metadata for read_image_metadata, but it does not explicitly mention that a file will be written to disk, nor does it explain prerequisites or relationships to the batch tool beyond 'single'.

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 the description only needs to add marginal value. It does add 'auto-scaling' context for font size and clarifies the metadata fields (dimensions, color, shape, description), but this is not substantial beyond the schema's detailed parameter descriptions.

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 uses a specific verb 'Generates' with a precise resource: 'single advanced custom mock 2D PNG asset'. It distinguishes from the sibling 'generate_mock_asset_batch' by explicitly stating 'single', and also explains the metadata integration with 'read_image_metadata'.

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 clearly indicates this tool is for generating a single asset, which implies the batch tool is for multiple assets. However, it does not explicitly state when-not-to-use or direct the user to alternatives beyond the implied distinction.

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/crony-io/2d-assets-mcp'

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