Skip to main content
Glama

Create a scene from an image

create_scene

Build a complete Foundry VTT scene from a map image: uploads the file, sizes the scene, sets the grid, adds walls, lights and tokens, then files it in a folder with a thumbnail.

Instructions

Makes a scene from a map image: uploads it if it's a local file (or uses a Foundry data path), sizes the scene to the image, sets the grid, adds walls, lights and tokens, files it in a folder and makes the thumbnail. Grid distance and units default to the game system's; token vision and fog exploration are on.

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": {
      "name": "<name>",
      "image": "<image>"
    },
    "name": "create_scene"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoAny other scene fields, merged last (e.g. darkness, backgroundColor)
nameYes
imageYesLocal image path on this server, or a path inside Foundry data
wallsNoWall data: {c:[x1,y1,x2,y2], door?:1, move?, sight?, light?, sound?}
dryRunNoReport what would happen without changing anything
folderNoFolder path, e.g. "Session2/Maps". Missing folders are created.
lightsNo
tokensNo
gridSizeNoPixels per square in the image
gridUnitsNoe.g. "m" or "ft"; defaults to the game system's
uploadDirNoWhere a local image is uploadedassets/scenes/maps
onDuplicateNoWhen a document with the same name is already in the target folder: skip it (default), replace it, or create anotherskip
gridDistanceNoDistance per square; defaults to the game system's

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior3/5

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

The description is unusually strong on side effects — it discloses automatic sizing, grid setup, wall/light/token creation, folder creation, and thumbnail generation, plus defaults (system grid distance/units, token vision and fog on). Against annotations that already declare destructiveHint=false and openWorldHint=false, the remaining gap is that nothing flags the potentially overwriting onDuplicate=replace path or that the operation is not trivially reversible; still, it adds far more than the annotations provide.

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 primary action and then a compressed list of side effects — every clause carries information. It is one long run-on sentence, which costs a little readability, but there is no filler.

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 13-parameter mutation tool with no output schema and thin annotations, the description covers the important behavioral ground: what gets created, where it lands, what defaults apply, and how images are resolved. Missing only guidance on dryRun previewing and how onDuplicate interacts with folder-level name collisions.

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 coverage is 77%, so the schema already documents image, folder, gridSize, gridUnits, gridDistance, uploadDir, onDuplicate, and dryRun. The description adds only a little: the local-path vs Foundry-data-path handling of image and the game-system defaults for grid units/distance. It says nothing about dryRun, onDuplicate, or the walls/lights/tokens array shapes.

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?

States a specific verb and resource ("Makes a scene from a map image") and then enumerates the concrete operations it performs: upload/size/grid/walls/lights/tokens/folder/thumbnail. That level of specificity distinguishes it cleanly from generic siblings like create, upload_file, and thumbnail without needing to name them.

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

Usage Guidelines3/5

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

Usage is implied by the description (map image in, fully populated scene out), and it explains the local-file vs Foundry-data-path branch for the image. But it never states when to use create_scene vs upload_file or create, nor when not to use it, so an agent must infer the routing decision.

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