Skip to main content
Glama

Create or replace an item template

dos2_put_item_template
DestructiveIdempotent

Creates or replaces a campaign item template for quest items, notes, books, weapons, and armor, saving it to the GM's Creatures and Items panel with a backup for undo.

Instructions

Creates a saved item template in the campaign (the Game Master's "Creatures and Items" panel), or replaces the one with the same name. Use it for quest items, readable notes and books, and custom weapons or armor the GM hands out.

Writes Eggs.lsf. 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.
Returns created (true for a new template), a summary of the template and the backup id. For NPC templates use
dos2_put_npc_template; to give an NPC template items, pass them in its items parameter instead.

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>",
      "name": "<name>"
    },
    "name": "dos2_put_item_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNoWhat to start from. A built-in sample: "quest" (plain item, default), "weapon", "weapon_generated" (has generated properties, required for boosts) or "armor"; or "Campaign:Name" of an existing item template.quest
bookNoText shown when the item is read as a book or note.
nameYesItem template name. An existing item template with this name is replaced.
levelNoItem level. Omit to keep the base's.
amountNoStack size.
boostsNoGenerated-property boosts, e.g. ["Boost_Weapon_Damage_Bonus_Large"]. Only valid with a base that has item generation, such as weapon_generated; otherwise the call fails.
rarityNoOne of Common, Uncommon, Rare, Epic, Legendary, Divine, Unique.
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.
stats_idNoStats entry, e.g. WPN_Axe_2H or LOOT_Ore_A_BlackRock_A. Omit to keep the base's.
descriptionNoCustom description shown in the item tooltip.
template_idNoRoot template GUID of the item (its model). Omit to keep the base's.
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 / amount / description
      Added value: +"Stack size."
    • addedInput schema / properties / base / description
      Added value: +"What to start from. A built-in sample: \"quest\" (plain item, default), \"weapon\", \"weapon_generated\" (has generated properties, required for boosts) or \"armor\"; or \"Campaign:Name\" of an existing item template."
    • addedInput schema / properties / book / description
      Added value: +"Text shown when the item is read as a book or note."
    • addedInput schema / properties / boosts / description
      Added value: +"Generated-property boosts, e.g. [\"Boost_Weapon_Damage_Bonus_Large\"]. Only valid with a base that has item generation, such as weapon_generated; otherwise the call fails."
    • 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 / description / description
      Added value: +"Custom description shown in the item tooltip."
    • addedInput schema / properties / level / description
      Added value: +"Item level. Omit to keep the base's."
    • addedInput schema / properties / name / description
      Added value: +"Item template name. An existing item template with this name is replaced."
    • addedInput schema / properties / rarity / description
      Added value: +"One of Common, Uncommon, Rare, Epic, Legendary, Divine, Unique."
    • addedInput schema / properties / stats_id / description
      Added value: +"Stats entry, e.g. WPN_Axe_2H or LOOT_Ore_A_BlackRock_A. Omit to keep the base's."
    • addedInput schema / properties / template_id / description
      Added value: +"Root template GUID of the item (its model). Omit to keep the base's."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructive=true and idempotent=true, and the description goes well beyond that by naming the file written (Eggs.lsf), disclosing that the previous file is backed up first, and pointing to dos2_restore for undo. It adds the runtime-safety failure mode and describes the return payload (created flag, template summary, backup id) that no output schema provides.

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 filesystem/backup behavior, then runtime constraint, then return values and alternatives—each sentence contributes. The single dense paragraph could be split into bullets for faster scanning, but there is no filler.

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, the description covers what an agent needs: what it mutates, the backup/undo path, the running-game hazard, expected return values, and which sibling to use instead. Nothing essential is left to inference.

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 description coverage is 100%, so every parameter is already documented in the schema, including base options, boost constraints, and the allow_running warning. The description reinforces a few of these (book/notes, weapon_generated for boosts) but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 ("Creates a saved item template in the campaign") and captures the upsert semantics ("or replaces the one with the same name"). The parenthetical locating it in the GM's "Creatures and Items" panel and the sibling reference to dos2_put_npc_template let an agent distinguish this from the NPC-template and journal/note tools without opening a schema.

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 concrete use cases ("quest items, readable notes and books, and custom weapons or armor the GM hands out") and explicitly routes NPC work to dos2_put_npc_template, including the note that an NPC template receives items via its own items parameter. It also states the critical precondition that the call fails while the game is running unless allow_running=true.

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