Skip to main content
Glama

set_trace_image

Overlay a reference image under a battle map to trace floor plans or sketches; adjust scale, opacity, and position, then clear it before final save.

Instructions

Put a reference image under the map to trace over. Returns what applied.

For reconstructing an approved sketch, a published floor plan, or a
hand-drawn dungeon. Load it, size it against the grid, drop its opacity so
your own work reads over it, then build on top — and hide it before the
final render, because it is a guide, not part of the map.

path: an ABSOLUTE path to an image on the machine running Dungeondraft.
scale: size multiplier. Set it so a known distance on the image matches the
  grid; guessing here is what makes a traced plan come out the wrong size.
opacity: 0 invisible, 1 opaque. Around 0.3-0.5 is usually enough to follow
  without drowning what you are drawing.
center: centre the image on the map.
clear: remove the trace image.
position: [x, y] in woxels (256 per grid square): where the image's
  centre sits, applied after center and scale. Centre it, read the reply's
  `position`, then set a position that puts a grid line drawn on the image
  on a map grid line. It sets rather than nudges, so repeating the call is
  harmless. A later center moves the image back to the map's centre and
  discards it.

Loading an image shows it and clear hides it. `visible` says whether it is
drawn now and `image_size` is null if the image did not load. Exports never
include it.

The trace SAVES with the map: its absolute path, scale, opacity and position
go into the file and it reloads next time. Anyone else who opens the map gets
a path that doesn't exist on their machine, and a large reference makes every
open slow. Call set_trace_image(clear=true) before the final save_map.

A path Windows can't open (260+ characters, typical of agent temp folders)
is copied to a short path in the bridge's output folder first; the response
says so under `copied_from`.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_trace_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
clearNo
scaleNo
centerNo
opacityNo
positionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that the trace saves into the map file with its absolute path, that other users get a broken path, that large references slow every open, that exports never include it, and that windows overlong paths get copied with a `copied_from` notice. Minor gap: nothing about permissions or failure modes for an unreadable/unsupported image beyond `image_size` being null.

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 summary is front-loaded and the per-parameter block is easy to scan, with every clause carrying real information. It is long and has a few redundant restatements ('Loading an image shows it and clear hides it'), which keeps it just short of a 5.

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?

There is no output schema, and the description compensates by naming the return fields an agent will see (position, visible, image_size, copied_from) and telling it how to use them ('read the reply's `position`, then set a position'). Combined with the persistence and cleanup guidance, an agent has everything needed to call this correctly and to clean up after itself.

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

Parameters5/5

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

Schema coverage is 0% and all six parameters are documented with meaning the schema cannot carry: path must be ABSOLUTE and on the Dungeondraft machine, scale should be derived from a known distance on the grid, opacity has a suggested 0.3-0.5 range, position is in woxels (256 per square) with set-not-nudge semantics, and center interacts destructively with a previously set position.

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 opening line gives a concrete verb and resource — 'Put a reference image under the map to trace over' — plus a return note. It is unmistakable what the tool does, though it never explicitly distinguishes itself from the sibling import_image, which is the one name an agent could plausibly confuse it with.

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?

Explicit use cases are given (approved sketch, published floor plan, hand-drawn dungeon), a full workflow is spelled out (load, size against grid, drop opacity, build, hide before render), and one hard exclusion is stated: 'Call set_trace_image(clear=true) before the final save_map.' Nothing is left to inference.

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

Deploy Server

Other Tools