Skip to main content
Glama

save_map

Save the open Dungeondraft map to disk so progress survives a crash. Omit the filename to overwrite the current map, or pass a new one to write a separate file.

Instructions

Save the map. Use this often — it is how work survives a crash.

filename: a bare name (".dungeondraft_map" is added if missing), written
  into the configured save directory — see get_save_directory. Omit it to
  save over the map already open.

The map you have open can always be overwritten; that is the point, and it
is how you check in progress as you go. A file that EXISTS and is not your
open map is refused, so a plausible-sounding name cannot destroy someone
else's map. Pass overwrite=True only when the user has actually asked to
replace that file.

A map that has never been saved has no path, so saving it needs a filename:
without one Dungeondraft opens a modal Save As dialog, and a modal freezes
this bridge until a human closes it.

Writing is asynchronous, so by default this waits until Dungeondraft
reports it finished writing THIS path and returns `completed: true`. While
a save is in flight Dungeondraft DROPS edits from the file, so the bridge
refuses to change the map until it lands.

`completed: false` means the save did not confirm in time. It is probably
still running: read `note`, poll get_status, and do NOT call save_map
again — a second write of the same file is the one thing that cannot help.

wait=False returns as soon as the save starts, for a caller that tracks
`saving.in_flight` itself.

If Dungeondraft does not start a save at all, this raises instead of
replying. Read the message, because the two causes need opposite action:
busy (retry in a few seconds), or wedged after a save crashed inside
Dungeondraft — then nothing can be written this session, a restart is the
only way out and it loses unsaved work, so stop building and tell the user.
Any edit made while a save is unfinished also carries a `save_warning`.

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": "save_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNo
filenameNo
overwriteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.7/5.0
Behavior5/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 thoroughly: it discloses overwrite protection for existing non-open files, that edits are DROPPED from the file while a save is in flight, that the bridge refuses map changes during a save, and that a modal Save As dialog freezes the bridge. It even distinguishes the two raise conditions (busy vs. wedged after a crashed save) and states that a restart loses unsaved work.

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 is front-loaded with the purpose and a usage nudge, then organized by concern (filename, overwrite, async, failure modes), and nearly every sentence carries operational weight. It is still ~250 words of dense prose for a 3-parameter tool, and the parameter definitions would read more cleanly as a compact list rather than inline paragraphs.

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 mutation tool with no annotations and no output schema, the description covers everything an agent needs: overwrite safety, the modal freeze hazard, the async completion contract including `completed: true/false`, the `note` and `save_warning` signals, and the exact error path. Nothing consequential is left to inference.

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 description coverage is 0%, so the description must compensate, and it defines all three parameters: filename as a bare name with '.dungeondraft_map' appended if missing and empty meaning 'overwrite the open map'; overwrite's safe-use condition; and wait's default blocking behavior vs. fire-and-return semantics. The required-filename case for a never-saved map is called out explicitly.

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 first line states a specific verb and resource — 'Save the map' — and the surrounding text pins down exactly where it writes (the configured save directory, see get_save_directory) and that it targets the open map. It never explicitly contrasts itself with plausible siblings such as export_map or checkpoint, so the sibling-differentiation test for a 5 is not met.

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?

Usage is spelled out with explicit conditions: 'Use this often', omit filename to overwrite the open map, pass overwrite=True 'only when the user has actually asked to replace that file', and wait=False only 'for a caller that tracks saving.in_flight itself'. It also gives explicit do-not guidance — after completed:false, 'do NOT call save_map again'.

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