Skip to main content
Glama

Generate a sprite from a text prompt

generate_sprite

Generate a Game Boy sprite from a text prompt, quantize to 4-color DMG palette, and save as sprite.png with .gbsres for immediate use in GB Studio projects.

Instructions

Generate a GB Studio sprite from a text prompt. Calls the configured image-generation provider (SPRITE_PROVIDER env var ∈ {openai, gemini, replicate, fal}; default openai), runs the result through a 4-colour DMG quantiser, and writes (sprite.png + sprite.png.gbsres) under assets/sprites/. Returns a spriteSheetId you can pass to create_actor immediately. Frames are 16×16; for multi the provider is called 3× (one per direction), for multi_movement 6× (idle + walk per direction). After quantisation a heuristic quality check runs; degenerate outputs refuse to save unless force: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDisplay name; also seeds the on-disk slug.
forceNoSkip the post-quantisation quality check and save the sprite even if it looks degenerate.
promptYesDescription of the character. Will be auto-wrapped with a pixel-art preamble; do not include palette / size hints yourself.
providerNoOverride the SPRITE_PROVIDER env default for this single call.
animationTypeYes
Behavior5/5

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

No annotations provided, so the description carries full burden. It fully discloses the process: calling image-generation provider, quantisation to 4-colour DMG, file writing (sprite.png + .gbsres), return value spriteSheetId, frame size, call count per animation type, and the heuristic quality check with force flag to override. No critical behaviors are hidden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is detailed and front-loaded with the main action. It is structured logically but slightly longer than necessary; however, given the tool's complexity, each sentence provides value. Could be slightly more concise but remains effective.

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?

No output schema exists, so the description appropriately explains the return value (spriteSheetId) and output files. It covers input (prompt, name, animationType), process (provider, quantisation, quality check), and output. For a tool with this complexity, the description is complete.

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

Parameters4/5

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

Schema coverage is 80% (4 of 5 parameters have descriptions). The description adds meaning beyond schema: explains that animationType impacts number of calls, provider can override env default, prompt gets auto-wrapped, force skips quality check. The animationType parameter lacks schema description but is clarified in the description.

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 tool generates a GB Studio sprite from a text prompt, specifies the output files and returned spriteSheetId, and distinguishes itself from sibling tools like convert_image_to_sprite by focusing on text-to-sprite generation.

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?

It provides guidance on when to use this tool (text prompt to sprite) and notes animation types trigger multiple calls. While it doesnt explicitly list when not to use it, the context around provider selection and quality check is helpful. Would benefit from mentioning alternatives like convert_image_to_sprite for image input.

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/gbs-toolkit/mcp-server'

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