Skip to main content
Glama

Apply with AI (Merge)

apply_with_ai

Merge / Apply-with-AI: apply a donor design (armor, outfit, weapon, hat, accessory, or overall style) onto a target sprite. Pass asset_id (+ artboard) for the target and donor_asset_id (+ donor artboard) OR style_reference_id for the donor. Defaults: preset style, subject character, density quality — infer preset/subject from the request and state your assumptions. Optional fit_to_target scales the donor design to the target subject. Results append to the target file. ~8 credits (HD).

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": {
      "asset_id": "<asset_id>"
    },
    "name": "apply_with_ai"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveNoAppend result into the target library file (default true).
presetNoMerge preset: character-transfer|armor|outfit|weapon|hat|accessory|style|custom. Default style; infer from the request (e.g. "give him the helmet" → hat).
densityNomax (1) | quality (~3, default).
subjectNoTarget subject: character|item|building|ui|custom. Default character; infer from the target sprite.
asset_idYesTarget library asset id — the sprite being modified (IMAGE 1).
artboard_idNoOptional artboard id from get_asset. Multi-artboard files need artboard_id or artboard_name to pick one sprite; omit for single-artboard assets.
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.
artboard_nameNoOptional artboard name from get_asset (e.g. "rocks_crystal"). Alternative to artboard_id.
custom_promptNoRequired for preset "custom" (the full instruction). For other presets: optional extra instructions. Subject/style only — no canvas size, no "no anti-aliasing" lectures; use color_policy for palette caps. Same caps as the in-app Merge fields: 1000 characters for preset "custom", 1000 for extra instructions on other presets; longer text is trimmed and the reply says so.
fit_to_targetNoIn-app Merge "Fit to target" — inject SCALE so the donor design matches the target subject size. Default false.
fix_preflightNoFor the target artboard. true = re-center the subject for this run (the only blocking finding). "all" = also apply the advisory brush and artboard-resize fixes, which can change the output size. Default false. The saved library file is not changed. Merge never blocks on these.
donor_asset_idNoDonor library asset (design reference, IMAGE 2). Provide this OR style_reference_id.
donor_artboard_idNoOptional donor artboard id from get_asset on donor_asset_id (multi-artboard donors).
style_reference_idNoDonor from References library (upload_style_reference / list_style_references). Alternative to donor_asset_id.
donor_artboard_nameNoOptional donor artboard name alternative.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations, it discloses cost (~8 credits HD), that results append to the target library file, what fit_to_target injects, and that fix_preflight can alter output size while merge itself never blocks on findings. It also notes that over-long custom_prompt text is trimmed and the reply says so — genuine side-effect detail the annotations do not carry.

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?

Dense but front-loaded: the operation and the required inputs come first, then defaults, then cost. Some material duplicates the schema nearly verbatim (the fit_to_target and preset/subject default notes), which is minor padding in an otherwise tight block.

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

Completeness4/5

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

For a 15-parameter, non-idempotent, open-world generation tool with no output schema, the definition covers required inputs, donor alternatives, defaults, side effects, and cost. The remaining gap is what happens after the call — whether it returns results inline or must be polled via get_generation_result — which the agent has to guess.

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 the baseline is 3; the description earns credit by surfacing the key semantic constraint that donor_asset_id and style_reference_id are alternatives, and by tying fit_to_target and color_policy to in-app controls. Much of the rest (preset/subject inference, custom_prompt requirements) is restated from the schema rather than added, keeping it below 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource — apply a donor design (armor, outfit, weapon, hat, accessory, or style) onto a target sprite — and spells out the donor/target input model, so the agent knows exactly what the tool produces. It does not name a nearby sibling such as reskin_character or generate_variants, so the agent must infer that differentiation from sibling names alone rather than from this text.

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 gives concrete invocation guidance: pass asset_id (+ artboard) for the target, and donor_asset_id (+ donor artboard) OR style_reference_id for the donor, with defaults for preset, subject, and density and an instruction to infer and state assumptions. What is missing is when not to use it and which sibling (e.g. reskin_character) to choose instead.

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