Skip to main content
Glama

Generate pixel art

generate_pixel_art

Generate new pixel art from a text prompt (in-app Generate → New). Infer sensible defaults and state them instead of interrogating the user: size = the width/height of the project's existing assets (list_assets), else 64; density quality; texture only when the user asks for a tiling material (256+); no style reference unless the user mentions one (reference_role style). Returns up to four labelled previews and saves every result. ~8 credits (HD). For a ready-made asset, list_marketplace_assets searches the asset library.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "generate_pixel_art"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoLibrary asset name when saving (default derived from prompt).
saveNoSave to the user's library (default true). When false, only returns the PNG.
sizeNoTarget square artboard size in pixels. Allowed: 64, 128, 256, 512, 1024. Match the project's existing assets (list_assets width/height); default 64. Every sprite size runs the same calibrated HD path (512/1024 are the 256px result enlarged losslessly). A texture needs 256+.
promptYesSubject only (e.g. 'red potion bottle'). Put canvas size in `size`, palette cap in `color_policy` — not in this text. Avoid '64x64' / 'no anti-aliasing' / 'crisp pixel clusters' lectures (pipeline owns those). Same cap as the in-app prompt box: longer text is trimmed to the first 1000 characters (60 for a texture material name) and the reply says so.
densityNoAt 64: "quality" (default, about 3 results) or "quantity" (as many as fit); "max" runs as quality. 128 and up always draw one result per run on the whole canvas (density max), which keeps their 1px pixels clean. Ignored for texture (always one tile).
textureNotrue draws one seamless tiling material (the prompt is its name, e.g. 'mossy cobblestone') instead of a sprite; needs size 256+. Omit for a sprite.
folder_idNoLibrary folder id from create_folder (scope must be 'art'). Places the saved artboard in that folder and inherits the folder's project_id when project_id is omitted.
project_idNoProject to attach the saved asset to. Defaults to the folder's project (if folder_id), else the user's oldest project. Required for the asset to appear in MagicPixel's project-scoped library.
color_policyNoPalette policy matching in-app ColorPolicyControl: "32"|"64"|"128"|"256" (max colors) or "none" (don't reduce). Default "128". Put palette caps here, not in the prompt.
project_styleNoStyle for this generation: "project" (default) draws the result in the game world of the account's active style (its brief, see get_style_profile); "none" leaves the brief out for a one-off asset outside that world.
reference_roleNoWith style_reference_id: "style" (default, borrow look only) or "subject" (keep the reference subject).
style_reference_idNoOptional style reference (upload_style_reference / list_style_references). Omit unless the user mentions a reference.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / density / description
      Previous value: -"\"quality\" (default, about 3 results) at every size; \"quantity\" (as many as fit) only at 64. Generate has no \"max\": it and any density the size does not offer run as quality. Ignored for texture (always one tile)."New value: +"At 64: \"quality\" (default, about 3 results) or \"quantity\" (as many as fit); \"max\" runs as quality. 128 and up always draw one result per run on the whole canvas (density max), which keeps their 1px pixels clean. Ignored for texture (always one tile)."
  2. Changed4 schema fields changed
    • changedInput schema / properties / size / description
      Previous value: -"Target square artboard size in pixels. Allowed: 64, 128, 256, 512, 1024. Match the project's existing assets (list_assets width/height); default 64. Every sprite size runs the same calibrated HD path (512/1024 are the 256px result enlarged losslessly). Texture subject needs 256+."New value: +"Target square artboard size in pixels. Allowed: 64, 128, 256, 512, 1024. Match the project's existing assets (list_assets width/height); default 64. Every sprite size runs the same calibrated HD path (512/1024 are the 256px result enlarged losslessly). A texture needs 256+."
    • removedInput schema / properties / style_image_id
      Removed value: -{
      -  "description": "Optional: one image of the active style's kit to anchor on (an id from get_style_set, at this size). Its look, scale and padding carry over and its type replaces subject_category. Omit to use subject_category's first image.",
      -  "maxLength": 64,
      -  "type": "string"
      -}
    • removedInput schema / properties / subject_category
      Removed value: -{
      -  "description": "Subject: character|item|building|ui|custom|texture. Infer from the prompt; default character. Texture requires size 256+.",
      -  "maxLength": 20,
      -  "type": "string"
      -}
    • addedInput schema / properties / texture
      Added value: +{
      +  "description": "true draws one seamless tiling material (the prompt is its name, e.g. 'mossy cobblestone') instead of a sprite; needs size 256+. Omit for a sprite.",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover safety only (non-read-only, open-world, non-idempotent, non-destructive); the description adds what they cannot: a cost estimate (~8 credits, HD tier), that up to four labelled previews are returned, and that every result is saved. It also discloses the defaulting chain for size (project's existing assets via list_assets, else 64) and why 512/1024 duplicate the 256px result, which is exactly the non-obvious behavior an agent would otherwise misjudge.

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?

Front-loaded with the core action and the defaulting policy before cost and the alternative, and every clause carries information. It is dense and parenthetical-heavy ("in-app Generate → New", list_assets callout), so parsing takes effort, but no sentence is filler.

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?

For a 12-parameter generative tool with no output schema, it covers what matters: what comes back (up to four labelled previews), that results are persisted, the credit cost, and how defaults are chosen. An agent can invoke this correctly without further probing.

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 100%, so baseline is 3, and the description earns above that by encoding defaults as decision rules — size from list_assets, density "quality", texture only for tiling materials, reference_role "style" only when a reference is mentioned. Some content overlaps the schema (size defaults, texture 256+), which keeps it from a 5.

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?

Opens with a specific verb+resource ("Generate new pixel art from a text prompt") and anchors it to the in-app surface (Generate → New). It explicitly separates itself from the sibling that would otherwise be confused with it: "For a ready-made asset, list_marketplace_assets searches the asset library."

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use rules per option: texture only when a tiling material is asked for (256+), no style reference unless the user mentions one, and a named alternative (list_marketplace_assets) for ready-made assets. It also states an operating policy — infer defaults and state them rather than interrogating the user — which removes the main decision ambiguity for an agent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources