Skip to main content
Glama

Put a file where the engine will load it

import_asset
Destructive

Copies a file into an RPG Maker MZ asset folder, validates its extension and case, records a backup for undo, and returns the data-field name to reference it.

Instructions

MZ has no importer and no per-asset metadata: the folder and the base name are the whole registration. This copies a file into one of the folders the engine's own loaders read (img/characters, img/faces, img/sv_actors, img/sv_enemies, img/enemies, img/battlebacks1/2, img/titles1/2, img/tilesets, img/parallaxes, img/pictures, img/animations, img/system, audio/bgm, audio/bgs, audio/me, audio/se, movies), checks the extension belongs there, refuses a name that differs from an existing file only by case (the filesystem folds those together and the second one would never load), and writes through the same backup journal as every other write, so undo_writes takes it back — including deleting a file that did not exist before. The reply gives the value to put in the data field (the name without extension) and which fields already name it, which is the half of check_assets that was missing a file. Overwriting needs overwrite: true; the bytes being replaced stay recoverable in the backup list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoAsset name without extension (default: the source file's own base name)
folderYesTarget folder, with or without its img/ or audio/ prefix
sourceYesFile to bring in: an absolute path, or project-relative when moving between folders
overwriteNoReplace the file that is already there

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true and idempotentHint=false; the description adds substantial behavior beyond that — extension validation, case-folding name refusal, writing through the backup journal, undo_writes recovering it including deleting a previously-nonexistent file, and recoverability of overwritten bytes. This is exactly the context annotations can't 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?

It's a dense single paragraph, but front-loaded with the core fact (no importer, folder+name is registration) before the mechanics. The long folder enumeration is bulky yet necessary for correctness; otherwise there's little waste.

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?

With no output schema, the description still explains the reply (the value for the data field and which fields already name the asset), covers validation and rollback behavior, and needs nothing more for an agent to invoke it correctly.

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 schema already documents all four parameters (baseline 3). The description adds meaning on top: `name` defaults to the source base name and overwriting requires `overwrite: true`, clarifying the mutation semantics of two params.

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 states a specific verb and resource (copies a file into folders the engine's loaders read) and enumerates the exact target folders, so the agent knows precisely what happens. It also distinguishes itself from siblings by referencing check_assets and undo_writes and framing itself as the missing half of asset checking.

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 clear conditions: the folder and base name are the whole registration, overwriting needs `overwrite: true`, and the write is reversible via undo_writes. It doesn't explicitly state when NOT to use it or name a competing import path, but the context is strong enough to route the agent correctly.

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