Skip to main content
Glama

Create or replace a vignette

dos2_put_vignette
DestructiveIdempotent

Create or replace an illustrated story card for a GM campaign, optionally adding a player vote, and save it with a backup for easy undo.

Instructions

Creates a vignette (an illustrated story card the Game Master shows to players, optionally with a vote), or replaces an existing one. The vignette to replace is found by key if given, otherwise by an equal title; otherwise a new one is created.

Writes Vignettes.lsf and, with image, copies the picture into the campaign's Vignettes/Illustrations. The previous file is backed up first; undo with dos2_restore.
Fails with an error while the game process is running unless allow_running=true. Fails with an error if the image file does not exist. Returns created, the vignette's uuid, the image
name and size, and the backup id. Read existing vignettes with dos2_vignettes.

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": {
      "campaign": "<campaign>",
      "title": "<title>",
      "text": "<text>"
    },
    "name": "dos2_put_vignette"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoStable identifier of your choice. The vignette's UUID is derived from it, so the same key always addresses the same vignette even after its title changes.
textYesThe story text shown on the card.
frameNoFile name of the border decoration. Keep the default unless you know another stock frame.GM_Border_Deco_01_A.png
imageNoAbsolute path to your own PNG (square, transparent background works best). It is copied into the campaign. Omit to use stock_image.
titleYesVignette title. Without key, an existing vignette with the same title is replaced.
canvasNoFile name of the paper background. Keep the default unless you know another stock canvas.GM_paperVersion_01.png
folderNoFolder the vignette is filed under in the GM's resources list. Default none.
answersNoAnswer options offered to the players for a vote. Omit for a vignette without a vote.
campaignYesThe campaign to work on: its name, its folder name, its UUID, or a unique part of any of them. dos2_status lists the campaigns.
questionNoThe question shown above the answers. Default empty.
stock_imageNoFile name of one of the game's stock vignette pictures, used when image is omitted.GM_Vignette_Beach_Generic_A.png
allow_runningNoKeep false. Set true only after the user has confirmed that the running game sits in the main menu: a write into a campaign that is loaded in the game gets lost or damages it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.1.1
    • addedInput schema / properties / allow_running / description
      Added value: +"Keep false. Set true only after the user has confirmed that the running game sits in the main menu: a write into a campaign that is loaded in the game gets lost or damages it."
    • addedInput schema / properties / answers / description
      Added value: +"Answer options offered to the players for a vote. Omit for a vignette without a vote."
    • addedInput schema / properties / campaign / description
      Added value: +"The campaign to work on: its name, its folder name, its UUID, or a unique part of any of them. dos2_status lists the campaigns."
    • addedInput schema / properties / canvas / description
      Added value: +"File name of the paper background. Keep the default unless you know another stock canvas."
    • addedInput schema / properties / folder / description
      Added value: +"Folder the vignette is filed under in the GM's resources list. Default none."
    • addedInput schema / properties / frame / description
      Added value: +"File name of the border decoration. Keep the default unless you know another stock frame."
    • addedInput schema / properties / image / description
      Added value: +"Absolute path to your own PNG (square, transparent background works best). It is copied into the campaign. Omit to use stock_image."
    • addedInput schema / properties / key / description
      Added value: +"Stable identifier of your choice. The vignette's UUID is derived from it, so the same key always addresses the same vignette even after its title changes."
    • addedInput schema / properties / question / description
      Added value: +"The question shown above the answers. Default empty."
    • addedInput schema / properties / stock_image / description
      Added value: +"File name of one of the game's stock vignette pictures, used when image is omitted."
    • addedInput schema / properties / text / description
      Added value: +"The story text shown on the card."
    • addedInput schema / properties / title / description
      Added value: +"Vignette title. Without key, an existing vignette with the same title is replaced."
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is known. The description still adds real value beyond them: which file is written (Vignettes.lsf), that the picture is copied into Vignettes/Illustrations, that a backup is taken first, and the allow_running failure mode. However, it does not describe what happens to unspecified fields on replace (merge vs overwrite), which is the key behavioural unknown for a destructive put.

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-loads purpose, then behaviour, then failure modes and return values in a tight four-sentence block with no filler. Slightly dense in the third sentence where two unrelated failure conditions are chained with a line break, but nothing is redundant given the structured fields.

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 12-parameter destructive write with no output schema, it covers the missing pieces: side effects on disk, backup/undo path, guard condition, and an inline enumeration of return values (created, uuid, image name and size, backup id). An agent has everything needed to call it safely.

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?

With 100% schema description coverage the baseline is 3, and the schema already explains key, image, stock_image and allow_running thoroughly. The description's genuine addition is the cross-parameter precedence rule (key over title) and the image-vs-stock_image selection, but it repeats rather than extends most per-parameter meaning.

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?

Uses a precise verb with an explicit dual scope ('creates ... or replaces an existing one') plus the resource definition in parentheses ('an illustrated story card the Game Master shows to players, optionally with a vote'). It also states the exact matching rule (key first, else equal title, else create), which no sibling name alone conveys.

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?

Gives explicit routing for the neighbouring tasks: read with dos2_vignettes, undo with dos2_restore, and the prerequisite that the game process must not be running unless allow_running=true. It also states the precondition that the image file must exist, so the agent can self-check before calling.

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