Skip to main content
Glama

Update a document

update
DestructiveIdempotent

Applies Foundry document changes such as HP values or flags to one Actor, Item, or other document, returning changed fields. Use embedded for walls, tokens, items, or pages.

Instructions

Applies Foundry update data to one document, e.g. {"system.derivedStats.hp.value": 20} or {"flags.x.-=y": null}. Returns the fields that change. For embedded documents (walls, tokens, items, pages) use embedded.

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": {
      "type": "<type>",
      "changes": "<changes>"
    },
    "name": "update"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
nameNoExact name; must be unambiguous
typeYesDocument type: Actor, Item, Scene, JournalEntry, Macro, RollTable, Playlist, Cards, Folder, ChatMessage, Combat, User
dryRunNoReport what would happen without changing anything
folderNoFolder path to disambiguate a name
changesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds genuine value beyond that by stating the return behavior ("Returns the fields that change") in the absence of an output schema, and by illustrating the patch syntax including the special "-=y" removal form. It does not disclose failure modes such as ambiguous name resolution, which is the main remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with the core action, worked examples, and the sibling exclusion in that order. The examples are the only elaboration and they earn their place by disambiguating the otherwise opaque 'changes' object.

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 destructive mutation tool with no output schema, the definition covers what it does, what it returns, and which tool handles the adjacent case. What is missing is how the three document-identification parameters (id, name, folder, plus type) resolve against each other when more than one is supplied.

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

Parameters4/5

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

Schema coverage is 67%, and the weakest parameter — 'changes', an unconstrained free-form object — is precisely the one the description compensates for with two concrete path/value examples. It adds little for id/name/type/folder/dryRun, which the schema already documents, and never explains how those selector parameters interact.

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?

"Applies Foundry update data to one document" gives a specific verb and resource, and the closing sentence explicitly names the sibling 'embedded' for a different document class. An agent can distinguish this from create/delete/embedded without opening another schema.

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

Usage Guidelines4/5

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

The description states one clear exclusion — embedded documents (walls, tokens, items, pages) belong to the 'embedded' tool — which is exactly the ambiguity that would otherwise misroute a call. It stops short of explaining when to prefer dryRun or how id/name/folder selection precedence works, so it is clear but not fully prescriptive.

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