Skip to main content
Glama

Embedded documents

embedded
Destructive

Manages documents inside Foundry VTT parents: list, create, update, or delete walls, tokens, effects, pages, and table results using parent IDs and entry _id values.

Instructions

Lists, creates, updates or deletes documents inside another: Wall, Token, AmbientLight, AmbientSound, Tile, Drawing, Note on a Scene; Item or ActiveEffect on an Actor; JournalEntryPage on a JournalEntry; TableResult on a RollTable. Updates need each entry's _id. New tokens may be {actorId|actorName, x, y}.

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": {
      "parentType": "<parentType>",
      "embedded": "<embedded>",
      "action": "<action>"
    },
    "name": "embedded"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNo
dataNo
actionYes
dryRunNoReport what would happen without changing anything
embeddedYes
parentIdNo
parentNameNo
parentTypeYesDocument type: Actor, Item, Scene, JournalEntry, Macro, RollTable, Playlist, Cards, Folder, ChatMessage, Combat, User

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, so the safety profile is partly covered. The description adds useful behavioral detail beyond that: updates require each entry's _id, and new tokens follow a {actorId|actorName, x, y} shape. It does not say which of the four actions is destructive, whether bulk operations are atomic, or what happens when ids/data lengths mismatch, which matters for a multi-action write tool.

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?

Three sentences, front-loaded with the action set and scoped by a compact enumeration of valid parent/child pairs; the _id and token-shape caveats follow logically. The type list makes the first sentence long and slightly run-on, but no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, 8-parameter, low-schema-coverage tool with no output schema, the description covers the core concept and the trickiest semantics (embedded type mapping, update identity, token shape). It leaves out the ids/parentId/parentName mechanics and any indication of what list returns or how bulk failures are handled, so an agent would still need to inspect the schema.

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 only 25%, so the description carries real weight here, and it does supply the key semantics for the 'embedded' parameter (valid child types per parent type) and for the 'data' payload on token creation, plus the _id requirement for updates. It says nothing about the ids parameter (delete/list targeting), the parentId vs parentName choice, or how data pairs with ids on update, so several undocumented parameters remain ambiguous.

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 description names a specific verb set (lists, creates, updates, deletes) and a precisely scoped resource: documents embedded inside another document. The enumeration of parent/child pairings (Token on Scene, Item on Actor, JournalEntryPage on JournalEntry, TableResult on RollTable) makes the scope concrete. It differentiates implicitly by 'inside another' rather than naming sibling alternatives such as create/update/delete/list, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is implied by the enumeration: you reach for this when the target document lives inside a parent, and 'Updates need each entry's _id' is a real prerequisite for the update path. There is no explicit when-not-to-use guidance and no pointer to the top-level create/update/delete/list siblings for non-embedded documents, leaving the boundary to inference.

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