foundryvtt-mcp

v3.1.0
@g33ks/foundryvtt-mcp Checked 1 day ago Published 11 days ago

Model Context Protocol server for FoundryVTT integration

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

roll_dice

Roll dice and return the total with a per-term breakdown. Dice terms and whole numbers joined by + or -, with whitespace allowed anywhere ("1d20+5", "1d20 + 5", "1d20+5+3", "2d6 + 1d4", "3d6"; a count-less "d20" means one die), always work and every term counts towards the total - that is the portable grammar, safe on either transport. Multiplication and Foundry modifier syntax such as "4d6kh3" or "1d20r1" are rejected on both transports, with an error naming the offending character and its position, never dropped from the total in silence. Parentheses are the one difference: with FOUNDRY_API_…

ParameterTypeDescription
formula *stringDice formula (e.g., "1d20+5", "3d6")
reasonstringOptional reason for the roll

search_actors

Search actors (player characters, NPCs) by name, optionally filtered by type. Returns a summary line per match: name, type, and the level and current/max hit points when the actor stores them at details.level and attributes.hp. Use when: checking whether an actor exists, or getting a quick roster. Do not use when: you already have the actorId and want more of that actor's values - use get_actor_details; or you need the actorId itself, which this tool does not print - read the foundry://actors resource, whose JSON lists up to the first 100 actors with their _id (not exhaustive in larger worlds)…

ParameterTypeDescription
cursorstringOpaque pagination cursor from a previous response to fetch the next page
limitnumberMaximum number of results to return
querystringSearch query for actor names
typestringActor type filter (character, npc, etc.)

get_actor_details

Get details for one actor by id: type, and the level, current/max hit points, armour class and ability values the actor stores at details.level, attributes.hp, attributes.ac and abilities (a game system that stores them elsewhere shows fewer fields; get_actor_stats returns all of its data); no biography or description text is returned (the description line always reads "No description available."). Use when: you have an actorId and need its current values - notably as the read-before-write step for update_actor_attributes. For one token on a map, give sceneId + tokenId instead of actorId: an u…

ParameterTypeDescription
actorIdstringThe ID of the actor to retrieve (omit when giving sceneId + tokenId)
sceneIdstringScene id of the token, required together with tokenId
tokenIdstringToken id: reads that token's own actor (base actor and the token's changes merged, for an unlinked token) instead of actorId

get_actor_inventory

List an actor's owned items (equipment, features, abilities…) with full system data per item, unlike get_actor_details which only reports the actor's own top-level stats. Use when: checking what a character or NPC carries or knows before an action or a trade. For one token on a map, give sceneId + tokenId instead of actorId: an unlinked token lists its own items (those it inherits from its base actor and its own, without the ones removed from it), a linked token its world actor's. Do not use when: you only need the actor's own values - use get_actor_details.

ParameterTypeDescription
actorIdstringThe ID of the actor whose inventory to list (omit when giving sceneId + tokenId)
sceneIdstringScene id of the token, required together with tokenId
tokenIdstringToken id: lists the items of that token's own actor (base actor and the token's changes merged, for an unlinked token) instead of actorId

update_actor_attributes

Update fields on an actor's system data. Patch keys are dot-paths into actor.system (e.g. "attributes.health.value", "resources.primary.value", "details.notes") and values are absolute target values, never relative deltas. If the actor stores a value at one of these paths, it is range-checked: attributes.hp.value against max + temp, spells.<key>.value against the max of that entry, and attributes.exhaustion against 0-10 (0-6 when the data of the actor marks older rules). Returns the post-update value for every patched path. Use when: applying damage or healing, spending a resource, or adjustin…

ParameterTypeDescription
patch *objectMap of dot-path → value, where each dot-path addresses a field under actor.system (e.g. {"attributes.health.value": 30, "resources.primary.value": 2}). Values must be number, string, or boolean.
actorIdstringThe ID of the actor to update (omit when giving sceneId + tokenId)
sceneIdstringScene id of the token to update, required together with tokenId
tokenIdstringToken id: updates that token's own actor (its delta, for an unlinked token) instead of actorId

create_world_actor

Create a new top-level Actor document (a permanent NPC or character sheet in the sidebar), optionally seeded with system data and filed under a folder. Use when: a new NPC or creature needs to exist as a persistent document, not just described in text. Do not use when: a quick throwaway description is enough - use generate_npc; or when adding an item to an actor that already exists - use create_actor_item. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permis…

ParameterTypeDescription
name *stringActor display name
type *stringGame-system actor type (e.g. "character", "npc")
flagsobjectOptional module flags for actor.flags, keyed by module id, e.g. {"my-module": {"key": "value"}} for data a module reads from the new actor
folderstringOptional Folder document id to file the actor under
systemobjectOptional system-specific data merged into actor.system

create_full_actor

Create a new top-level Actor document AND seed it with starting items (gear, weapons, features, …) in one call, instead of create_world_actor followed by one create_actor_item per item. Pairs with get_document_schema: call that once per Actor/Item type to learn the real field names for `system`, then build the whole character here in a single call. The actor is always created first - a failure there aborts the whole call. Item creation is best-effort per item, not atomic: a bad item (e.g. a typo'd type) is reported in the response's item-failures list rather than losing the actor or the item…

ParameterTypeDescription
name *stringActor display name
type *stringGame-system actor type (e.g. "character", "npc")
folderstringOptional Folder document id to file the actor under
itemsarrayOptional starting items (weapons, gear, features, …) to create on the actor immediately after it exists
systemobjectOptional system-specific data merged into actor.system - use get_document_schema("Actor", type) to learn the real field names first

delete_world_actor

Permanently delete a top-level Actor document. Use when: the user explicitly asks to remove an NPC or character sheet, and has given you the actorId. Do not use when: only removing a token placed on a scene - use delete_token; the actor document is untouched by that. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
actorId *stringThe ID of the actor to delete

search_items

Search item documents in the world by name, optionally filtered by type. Returns name, type and rarity per match (rarity shows "Common" when the system records none); price is not available and always prints "Unknown price", and the rarity filter is ignored unless the REST API module is configured (FOUNDRY_API_KEY). Item ids are not printed - read the foundry://items resource, whose JSON lists up to the first 100 items with their _id (not exhaustive in larger worlds). Use when: checking whether an item exists in the world. Do not use when: searching compendium packs (use search_compendium) or…

ParameterTypeDescription
cursorstringOpaque pagination cursor from a previous response to fetch the next page
limitnumberMaximum number of results to return
querystringSearch query for item names
raritystringItem rarity filter (common, uncommon, rare, etc.). Applied only in REST API mode (FOUNDRY_API_KEY); ignored on the default Socket.IO path.
typestringItem type filter (weapon, armor, consumable, etc.)

search_compendium

Search FoundryVTT compendium packs by name and metadata; searches all enabled packs unless compendiumId scopes it to one pack. Use when: looking up creatures, items or rules that are not yet present in the world. Do not use when: the document already exists in the world - use search_items or search_world. Requires the REST API module (FOUNDRY_API_KEY); without it the search returns no results instead of failing.

ParameterTypeDescription
query *stringSearch query for compendium entry names
cursorstringOpaque pagination cursor from a prior result's "Next page" cursor; omit for the first page
filtersobjectOptional metadata filters to narrow the search
limitnumberMaximum number of results per page

create_actor_item

Create an item on an actor from an inline item document (type, name, system) or by referencing a compendium pack entry (compendium sources require the companion Foundry module). Use when: adding a new weapon, feature, or piece of equipment to a known actorId. For one token on a map, give sceneId + tokenId (an actorId given as well must be the actor of the token): an unlinked token gets the item on that token only, a linked token on its world actor. Do not use when: editing an item the actor already owns - use update_actor_item. Replacing an item is not atomic: create the replacement first and…

ParameterTypeDescription
source *objectItem source. Either { type: "inline", item: { type, name, system } } or { type: "compendium", compendiumId, itemId } (requires companion module).
actorIdstringThe ID of the actor to add the item to (omit when giving sceneId + tokenId)
sceneIdstringScene id of the token, required together with tokenId
tokenIdstringToken id: adds the item to that token's own actor instead of actorId (only that token, for an unlinked token)

update_actor_item

Apply a JSON merge patch to an item's system data on an actor: nested paths such as activities.{id}.consumption.targets are supported, values are absolute (arrays replace, null deletes). Use when: changing fields on an item the actor already owns, given actorId + itemId. For one token on a map, give sceneId + tokenId: on an unlinked token only that token changes, even for an item it inherits from its base actor. Do not use when: adding a new item (create_actor_item) or removing one (delete_actor_item). Canonical target: D&D 5e v4+ activity schema. WRITE: mutates the live world. Requires FOUNDR…

ParameterTypeDescription
itemId *stringThe ID of the item to update
patch *objectJSON merge patch applied to item.system; nested paths supported (e.g. activities.{id}.consumption.targets)
actorIdstringThe ID of the actor that owns the item (omit when giving sceneId + tokenId)
sceneIdstringScene id of the token, required together with tokenId
tokenIdstringToken id: changes the item on that token's own actor instead of actorId (only that token, for an unlinked token)

delete_actor_item

Permanently remove an item owned by an actor. Use when: the user explicitly asks to delete or discard a specific owned item, and you have its itemId from the user or from get_actor_inventory (which lists the ids of the items an actor owns) - never guess one. For one token on a map, give sceneId + tokenId: an unlinked token loses the item on that token only, even one it inherits from its base actor. Do not use when: only the item's data needs to change - use update_actor_item. In a replacement or migration flow, run create_actor_item first and this second: the two calls are not atomic, and fail…

ParameterTypeDescription
itemId *stringThe ID of the item to delete
actorIdstringThe ID of the actor that owns the item (omit when giving sceneId + tokenId)
sceneIdstringScene id of the token, required together with tokenId
tokenIdstringToken id: deletes the item from that token's own actor instead of actorId (only that token, for an unlinked token)

get_scene_info

Get details of the active scene, or of a specific scene by id: name, scene id, active/navigation flags, pixel dimensions, padding, grid (type, size in pixels, distance, units), and lighting (global light, darkness); no description text is returned unless a module has set a description flag on the scene (the description line otherwise reads 'No description available.'). Use when: you need the sceneId, grid size, or the scene's pixel extents. Do not use when: looking a scene up by name (use search_world), or you need token/tile coordinates - this tool returns neither; use list_tiles or the found…

ParameterTypeDescription
sceneIdstringOptional scene ID. If not provided, returns current scene

create_scene

Create a new Scene document from a background image already present under FoundryVTT's Data directory (see list_scene_assets to browse available map art). Width/height default to the image's real pixel dimensions read from disk (requires FOUNDRY_DATA_PATH) — the single biggest source of a misaligned grid when set by hand; pass width/height explicitly to override. Use when: a new location needs a scene before the party arrives there, or a fresh battlemap needs to exist as a document. Do not use when: the scene already exists - use switch_scene to activate it, or set_scene_lighting to change i…

ParameterTypeDescription
backgroundSrc *stringData-relative path to the background image (e.g. "assets/maps/v1/x.jpg"), as returned by list_scene_assets
name *stringScene display name
activatebooleanOptional; true to immediately activate the new scene for all players
backgroundColorstringHex color shown outside the background image (default "#999999")
gridDistancenumberReal-world distance one grid cell represents (default 1)
gridSizenumberGrid cell size in pixels (default 100)
gridTypenumberFoundry grid type constant (default 1 = square)
gridUnitsstringUnit label for gridDistance (e.g. "ft", "m") (default "ft")
heightnumberOptional explicit pixel height; defaults to the image's real height
paddingnumberFractional canvas padding around the background image (default 0.25)
widthnumberOptional explicit pixel width; defaults to the image's real width

switch_scene

Activate a scene, switching every connected player's canvas to it. FoundryVTT enforces a single active scene server-side, so activating one automatically deactivates whichever scene was active before - no separate deactivation call is needed. Use when: the party moves to a new map (new area, travel, a battle starting on a prepared map). Do not use when: you only need to read scene info - use get_scene_info. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permi…

ParameterTypeDescription
sceneId *stringThe ID of the scene to activate

delete_scene

Permanently delete a Scene document. Use when: the user explicitly asks to remove a map that is no longer needed. Do not use when: you only want to stop showing it to players - use switch_scene to activate a different one instead; deleting the active scene leaves no scene active. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
sceneId *stringThe ID of the scene to delete

set_scene_lighting

Set a scene's ambient darkness level (0-1) and/or global illumination (globalLight, globalLightThreshold). Written to the Scene document's environment fields (environment.darknessLevel, environment.globalLight) - no canvas access required. Use when: transitioning to night, dimming a room, or lighting a torch-lit area. Do not use when: you only need to read current lighting - use get_scene_info. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the…

ParameterTypeDescription
sceneId *stringThe ID of the scene to update
darknessnumberAmbient darkness level, 0 (fully lit) to 1 (pitch black)
globalLightbooleanWhether the whole scene is globally illuminated
globalLightThresholdnumberDarkness level above which global light is suppressed

reset_fog

Reset fog of war exploration progress for a scene, defaulting to the active scene when sceneId is omitted. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

set_scene_weather

Set or clear weather effects on a scene (e.g. "rain", "snow", "leaves", "rainStorm", "fog", or empty string "" to clear). Default values come from Foundry core; additional effects may be available if weather modules are installed. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
weather *stringWeather effect key (e.g. "rain", "snow", "leaves", "rainStorm", "fog"), or "" to clear
sceneIdstringOptional Scene ID; defaults to the active scene

list_walls

List the Walls on a scene (id, endpoints, and the move/sight/door/ds fields), defaulting to the active scene when sceneId is omitted. Read from cached worldData - no canvas access needed. Use when: finding a wallId for delete_wall/set_door_state, or checking a scene's current wall layout before adding more. Do not use when: you need tile or token positions instead - this only lists Wall documents.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

create_wall

Create a new Wall segment on a scene - the structural building block for rooms, corridors, and doors. Unlike create_tile (which centres in a cell), a wall connects two grid *vertices* (intersections): fromCol/fromRow -> toCol/toRow, e.g. fromCol:3,fromRow:5 -> toCol:4,toRow:5 is the one-cell-long top edge of cell (3,5); a longer run spans multiple cells in one call. Alternatively pass explicit pixel x1/y1/x2/y2. type selects one of FoundryVTT's own named wall presets (the ones its wall-tool palette offers): "wall" (default, solid - blocks movement and sight), "door" (openable via set_door_stat…

ParameterTypeDescription
sceneId *stringThe ID of the scene to place the wall on
fromColnumberStart grid vertex column. Alternative to x1/y1.
fromRownumberStart grid vertex row. Alternative to x1/y1.
toColnumberEnd grid vertex column. Alternative to x2/y2.
toRownumberEnd grid vertex row. Alternative to x2/y2.
typestringWall nature (default "wall"): wall = solid; door = openable, starts closed; secretDoor = hidden until discovered, starts closed; terrain = blocks movement, sight blocks only on the second crossing; in…
x1numberStart pixel x coordinate. Alternative to fromCol/fromRow.
x2numberEnd pixel x coordinate. Alternative to toCol/toRow.
y1numberStart pixel y coordinate. Alternative to fromCol/fromRow.
y2numberEnd pixel y coordinate. Alternative to toCol/toRow.

delete_wall

Remove a Wall from a scene. Use when: undoing a placement mistake, or opening up a room by removing a wall segment entirely (as opposed to opening a door - use set_door_state to keep the wall and just toggle it). Do not use when: you want to remove a tile or token instead - this only affects Wall documents. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
sceneId *stringThe ID of the scene the wall is on
wallId *stringThe ID of the wall to remove

set_door_state

Open, close, or lock a door (a Wall document with door !== 0). Use when: a party opens or shuts a door, or a door should be locked/unlocked. Do not use when: you don't have the wallId - use list_walls, or ask the user, or read the foundry://scenes resource. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
state *number0 = closed, 1 = open, 2 = locked
wallId *stringThe ID of the door (Wall document) to change
sceneIdstringOptional Scene ID to scope the wall lookup

list_scene_assets

List image assets (map backgrounds, prop/token art) under a folder of the FoundryVTT Data directory, with real pixel dimensions and any `[Tag, Tag]`-bracketed keyword tags parsed out of the filename (the naming convention several battlemap packs use). Requires FOUNDRY_DATA_PATH — this server must run on the same host as FoundryVTT. Use when: choosing a background for create_scene, or browsing available decoration art for create_tile before placing anything. Do not use when: FOUNDRY_DATA_PATH is not set - this always returns empty in that case.

ParameterTypeDescription
kindstringAsset category to scan for: "image" (default) or "audio"
limitnumberMaximum results to return (default 200)
querystringOptional case-insensitive substring filter on filename or parsed tags
subdirstringData-relative folder to scan (default "assets")

list_tiles

List the Tiles placed on a scene (id, image src, position, size, rotation, hidden), defaulting to the active scene when sceneId is omitted. Read from cached worldData - no capture_scene screenshot needed to see current decoration state. Use when: checking what is already placed before adding more, or getting a tileId for delete_tile. Do not use when: you need token positions instead of tile positions - tiles and tokens are separate document types; this only lists tiles.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

find_open_cells

Scan a scene's grid for cells with no wall crossing them and no existing tile/token already centred there - a placement candidate list for create_tile/spawn_token that needs no screenshot to compute. Restricted to the background image's own extent; the scene's padding margin is never returned as floor. Use when: deciding where to place a new tile or token without visual inspection. Do not use when: you already have a specific target position in mind - this is for open-ended 'somewhere sensible' placement, not for verifying one exact spot.

ParameterTypeDescription
sceneId *stringThe ID of the scene to scan
limitnumberMaximum open cells to return (default 50)

create_tile

Place a decorative Tile on a scene from an image already present under FoundryVTT's Data directory (see list_scene_assets). Width/height default to the image's real pixel dimensions when not given. Position is either explicit pixel x/y (top-left corner) or a gridCol/gridRow cell (the tile is centred in that cell - see find_open_cells for candidates). By default refuses to place a tile whose bounding box crosses a scene wall; pass allowWallOverlap: true to place anyway (e.g. a wall-mounted prop). Use when: decorating a scene with scenery (crates, dumpsters, vehicles, graffiti) that is not a cre…

ParameterTypeDescription
sceneId *stringThe ID of the scene to place the tile on
src *stringData-relative path to the tile image, as returned by list_scene_assets
allowWallOverlapbooleanOptional; true to allow placement even if the bounding box crosses a wall (default false - refuses)
elevationnumberOptional elevation (default 0)
gridColnumberGrid column to centre the tile in. Alternative to x/y.
gridRownumberGrid row to centre the tile in. Alternative to x/y.
heightnumberOptional explicit pixel height; defaults to the image's real height
hiddenbooleanOptional; true to place the tile hidden from players
rotationnumberOptional rotation in degrees (default 0)
widthnumberOptional explicit pixel width; defaults to the image's real width
xnumberTarget top-left x pixel coordinate. Alternative to gridCol/gridRow.
ynumberTarget top-left y pixel coordinate. Alternative to gridCol/gridRow.

delete_tile

Remove a Tile from a scene. Use when: undoing a placement mistake, or clearing decoration that no longer fits the scene. Do not use when: you want to remove a token or actor instead - this only affects Tile documents; use delete_token or delete_world_actor. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
sceneId *stringThe ID of the scene the tile is on
tileId *stringThe ID of the tile to remove

get_combat_state

Get the active combat encounter: initiative order with each combatant's name and initiative, its hit points and armour class when its actor stores them at attributes.hp and attributes.ac, plus the current round and which combatant is up. Use when: reporting whose turn it is, or checking whether a combat is already running before start_combat. Do not use when: you need a combatantId for set_initiative - this prints names and ordinals, not ids; read the foundry://combat resource, whose JSON includes each combatant's _id and lists combatants in this same initiative order, so the Nth entry printed…

list_lights

List the AmbientLight sources placed on a scene (id, position, dim/bright radius, color, rotation, animation, hidden), defaulting to the active scene when sceneId is omitted. Read from cached worldData - no canvas access needed. Use when: inspecting scene lighting or finding a lightId for update_light/delete_light.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

list_sounds

List the AmbientSound sources placed on a scene (id, position, radius, audio path, volume, repeat, hidden), defaulting to the active scene when sceneId is omitted. Read from cached worldData - no canvas access needed. Use when: inspecting ambient audio or finding a soundId for delete_sound.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

list_notes

List the Map Notes (journal pins) placed on a scene (id, position, label text, linked journal entry and page, global visibility), defaulting to the active scene when sceneId is omitted. Read from cached worldData - no canvas access needed. Use when: finding pins on the map or getting a noteId for delete_note.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

list_drawings

List the Drawings placed on a scene (id, shape type, position, dimensions/radius, text label, colors, hidden, locked), defaulting to the active scene when sceneId is omitted. Read from cached worldData - no canvas access needed. Use when: inspecting canvas shapes or finding a drawingId for delete_drawing.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

list_templates

List the Measured Templates (area-of-effect shapes) placed on a scene (id, template type, position, distance, direction, angle, width, colors, hidden), defaulting to the active scene when sceneId is omitted. Read from cached worldData - no canvas access needed. Use when: inspecting active areas of effect or finding a templateId for delete_template.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

create_light

Create a new AmbientLight source on a scene at either pixel x/y or a gridCol/gridRow cell (the light is centered in that cell). Supports dim/bright radii, color hex tint (#rrggbb), angle, rotation, and animation presets (e.g. torch, pulse, chroma). WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
anglenumberLight emission angle in degrees (default 360)
animationIntensitynumberAnimation intensity 1-10 (default 5)
animationSpeednumberAnimation speed 0-10 (default 5)
animationTypestringOptional animation type (e.g. "torch", "pulse", "chroma", "wave")
brightnumberBright light radius in grid units (default 0)
colorstringLight color as a 6-digit hex string (e.g. "#ff8800")
dimnumberDim light radius in grid units (default 0)
gridColnumberGrid column (centers in cell)
gridRownumberGrid row (centers in cell)
hiddenbooleanWhether the light source is hidden (default false)
rotationnumberLight rotation in degrees (default 0)
sceneIdstringOptional Scene ID; defaults to the active scene
visionbooleanWhether this light provides vision to tokens (default false)
wallsbooleanWhether light is constrained by walls (default true)
xnumberPixel x coordinate (center)
ynumberPixel y coordinate (center)

update_light

Update an existing AmbientLight source on a scene (radii, color, position, angle, animation, walls/vision/hidden). WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
lightId *stringThe ID of the ambient light to update
anglenumberLight emission angle in degrees
brightnumberBright light radius in grid units
colorstringLight color as a 6-digit hex string (e.g. "#ff8800")
dimnumberDim light radius in grid units
hiddenbooleanWhether the light source is hidden
rotationnumberLight rotation in degrees
sceneIdstringOptional Scene ID; defaults to the active scene
visionbooleanWhether this light provides vision
wallsbooleanWhether light is constrained by walls
xnumberNew pixel x coordinate
ynumberNew pixel y coordinate

delete_light

Permanently remove an AmbientLight from a scene. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
lightId *stringThe ID of the ambient light to delete
sceneIdstringOptional Scene ID; defaults to the active scene

create_sound

Create an AmbientSound source on a scene from an audio file path (browse available audio via list_scene_assets with kind="audio"). Placement is either pixel x/y or a gridCol/gridRow cell. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
path *stringAudio file path (e.g. "assets/audio/rain.mp3")
easingbooleanWhether volume fades towards the boundary (default true)
gridColnumberGrid column (centers in cell)
gridRownumberGrid row (centers in cell)
hiddenbooleanWhether the sound is hidden/disabled (default false)
radiusnumberAudible radius in grid units (default 0)
repeatbooleanWhether the audio loops continuously (default false)
sceneIdstringOptional Scene ID; defaults to the active scene
volumenumberPlayback volume 0.0 to 1.0 (default 0.5)
wallsbooleanWhether sound is blocked by walls (default true)
xnumberPixel x coordinate (center)
ynumberPixel y coordinate (center)

delete_sound

Permanently remove an AmbientSound from a scene. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
soundId *stringThe ID of the ambient sound to delete
sceneIdstringOptional Scene ID; defaults to the active scene

create_note

Place a Map Note (journal pin) on a scene at pixel x/y or a gridCol/gridRow cell. Must link to an entryId (journal entry), provide text (standalone label), or both. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
entryIdstringOptional JournalEntry document ID to link to this pin
fontSizenumberLabel font size in pixels (8-128, default 32)
globalbooleanWhether the note is visible regardless of fog/vision (default false)
gridColnumberGrid column (centers in cell)
gridRownumberGrid row (centers in cell)
iconSizenumberPin icon size in pixels (minimum 32, default 40)
pageIdstringOptional JournalEntryPage ID within the linked entry
sceneIdstringOptional Scene ID; defaults to the active scene
textstringOptional label text displayed below or on the pin
textAnchornumberText anchor point: 0 (center), 1 (bottom/default), 2 (top), 3 (left), 4 (right)
xnumberPixel x coordinate (center)
ynumberPixel y coordinate (center)

delete_note

Permanently remove a Map Note pin from a scene (does not delete the linked journal entry). DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
noteId *stringThe ID of the map note to delete
sceneIdstringOptional Scene ID; defaults to the active scene

create_drawing

Create a Drawing shape on a scene (rectangle "r", circle "c", ellipse "e", or polygon "p") with optional text, fill, and stroke styling. Position x, y is the top-left corner of the shape. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
x *numberPixel x coordinate (top-left)
y *numberPixel y coordinate (top-left)
fillAlphanumberFill opacity 0.0 to 1.0 (default 0.5)
fillColorstringFill color as a 6-digit hex string (e.g. "#336699")
fillTypenumberFill type: 0 (none), 1 (solid), 2 (pattern)
fontSizenumberFont size in pixels (8-256, default 48)
heightnumberHeight in pixels (required for "r" and "e")
hiddenbooleanWhether the drawing is hidden from players (default false)
lockedbooleanWhether the drawing is locked from interaction (default false)
pointsarrayArray of coordinates [x1, y1, x2, y2, ...] with at least 3 points (required for "p")
radiusnumberRadius in pixels (required for "c")
rotationnumberRotation in degrees (default 0)
sceneIdstringOptional Scene ID; defaults to the active scene
shapestringShape type: "r" (rectangle, default), "c" (circle), "e" (ellipse), "p" (polygon)
strokeColorstringStroke color as a 6-digit hex string (e.g. "#ffffff")
strokeWidthnumberStroke line width in pixels (default 8)
textstringOptional text label displayed inside the drawing
widthnumberWidth in pixels (required for "r" and "e")

delete_drawing

Permanently remove a Drawing from a scene. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
drawingId *stringThe ID of the drawing to delete
sceneIdstringOptional Scene ID; defaults to the active scene

create_template

Place a Measured Template (area-of-effect shape: "circle", "cone", "rect", "ray") on a scene at pixel x/y or a gridCol/gridRow cell. Distance is specified in scene grid units (e.g. metres or feet). WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
distance *numberEffect distance/radius in grid units (e.g. 6m or 30ft)
anglenumberCone spread angle in degrees (required for cone, e.g. 45 or 53.13)
borderColorstringBorder color as a 6-digit hex string
directionnumberDirection angle in degrees (0 = right, 90 = down; required for cone/ray/rect)
fillColorstringFill color as a 6-digit hex string
gridColnumberGrid column (centers origin in cell)
gridRownumberGrid row (centers origin in cell)
hiddenbooleanWhether the template is hidden from players (default false)
sceneIdstringOptional Scene ID; defaults to the active scene
tstringTemplate type (default "circle")
widthnumberRay line width in grid units (required for ray)
xnumberPixel x coordinate (origin point)
ynumberPixel y coordinate (origin point)

delete_template

Permanently remove a Measured Template area-of-effect shape from a scene. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
templateId *stringThe ID of the measured template to delete
sceneIdstringOptional Scene ID; defaults to the active scene

next_turn

Advance the active combat to the next turn, wrapping to the next round after the last combatant. When skipDefeated is true, defeated combatants are skipped. Use when: the current combatant has finished their turn. Do not use when: only reporting the turn order - use get_combat_state. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
skipDefeatedbooleanSkip combatants flagged as defeated when advancing. Defaults to the combat's skipDefeated setting, or false.

end_combat

End the active combat encounter by deleting its Combat document, discarding the initiative order and round count. Use when: the fight is over and the user asks to end the encounter. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

set_initiative

Set a combatant's initiative in the active combat (or in combatId when given), reordering the turn order. When that reorder moves the combatant who is currently acting to a different position, the encounter's turn index is rewritten to follow them - whoever was up stays up, and the result says so - rather than leaving the marker on whoever slid into the old slot. That follow-up applies only to the active combat: a combatId naming some other encounter still records the initiative, but its turn order is not readable here and is left alone. Use when: an initiative roll needs to be recorded or cor…

ParameterTypeDescription
combatantId *stringThe ID of the combatant whose initiative to set
initiative *numberThe initiative value to assign
combatIdstringOptional Combat document ID; defaults to the active combat

start_combat

Start a new combat encounter, seeding combatants from tokens: pass explicit tokenIds, or omit them to seed every token on the scene. Defaults to the active scene when sceneId is omitted. The encounter begins at round 1, turn 0, as when the GM clicks Begin Combat in Foundry. With the companion module 0.7.0 or later, the combat is created in its browser session, so the game system prepares the combat and its combatants; without it, the combat is created over the socket, and when the game system defines combat types of its own, open browsers reject it until each user reloads FoundryVTT (F5); late…

ParameterTypeDescription
sceneIdstringOptional Scene document ID; defaults to the active scene.
tokenIdsarrayOptional list of Token document IDs to add as combatants. Defaults to all tokens on the scene.

list_tokens

List the Tokens placed on a scene (id, display name, linked actorId, x/y pixel position, width/height in grid cells, elevation, rotation, hidden, disposition), defaulting to the active scene when sceneId is omitted. Read from cached worldData - no canvas access needed. Use when: you need to know what's on the map and where before moving, targeting, or applying an effect to a token, or to resolve a token's id from its name instead of asking the user. Do not use when: you need wall or tile layout instead - use list_walls/list_tiles.

ParameterTypeDescription
sceneIdstringOptional Scene ID; defaults to the active scene

move_token

Move a token to new x/y pixel coordinates on its scene; the token is located across scenes by id, optionally scoped with sceneId. Coordinates are absolute pixels, not grid squares and not offsets. Use when: repositioning a token to a position the user has given you, or one computed from list_tokens (current positions) and get_scene_info (grid size). Do not use when: repositioning several tokens at once - use move_tokens; or the destination may be blocked by a wall/door - use move_token_pathfind, which routes around them instead of teleporting through. WRITE: mutates the live world. Requires FO…

ParameterTypeDescription
tokenId *stringThe ID of the token to move
x *numberTarget x pixel coordinate on the scene
y *numberTarget y pixel coordinate on the scene
sceneIdstringOptional Scene ID to scope the token lookup

apply_status_effect

Apply or remove a status condition (e.g. "prone", "stunned") on a token's actor. Set active=false to remove. Matches by status id, so re-applying or clearing-when-absent is a no-op. With the module bridge enabled, it first waits up to 10 s for the companion module if it is still connecting. With module 0.6.0 or later, the status goes through the game system's own status effects, so the system recognises the effect as its condition; effects carrying the status that were written earlier over the socket are reported when applying and removed with active=false. Some game systems ask for a value wh…

ParameterTypeDescription
statusId *stringThe status condition id (e.g. 'prone', 'stunned', 'blinded')
tokenId *stringThe ID of the token whose actor to affect
activebooleantrue to apply the effect (default), false to remove it
createOptionsobjectOptional creation options the game system reads when a status is created (at most 10 keys, 1 KiB of JSON; not the core's own options such as parent or keepId). Only with active=true, through the compa…
sceneIdstringOptional Scene ID to scope the token lookup

spawn_token

Place a new token for an existing actor onto a scene at given x/y pixel coordinates, defaulting to the active scene when sceneId is omitted. Base display fields (texture, size, vision) are seeded from the actor's prototypeToken. Use when: a creature, NPC, or reinforcement needs to appear on the map. Do not use when: repositioning a token that is already on the scene - use move_token. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
actorId *stringThe ID of the actor the new token represents
x *numberTarget x pixel coordinate on the scene
y *numberTarget y pixel coordinate on the scene
hiddenbooleanOptional; true to place the token hidden from players
namestringOptional display name override; defaults to the actor's name
sceneIdstringOptional Scene ID; defaults to the active scene

delete_token

Remove a token from a scene without deleting the underlying actor. Use when: a creature is defeated and removed from the battle, or a token was placed by mistake. Do not use when: the actor document itself should be deleted - use delete_world_actor; this only removes the token's placement on the map. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
tokenId *stringThe ID of the token to remove
sceneIdstringOptional Scene ID to scope the token lookup

move_token_pathfind

Move a token to x/y coordinates, routing around impassable walls when the direct line is blocked (A* pathfinding over the scene's Wall geometry), and — unless openDoors is false — opening any closed doors the route needs to cross. Slower and more expensive than move_token (issues one document update per waypoint, with a short pause per door opened), and its wall detection covers ordinary geometric walls only, not anything canvas-only would also enforce (terrain height, drawing-based obstacles). Use when: a token should walk realistically around obstacles instead of teleporting through them…

ParameterTypeDescription
tokenId *stringThe ID of the token to move
x *numberTarget x pixel coordinate on the scene
y *numberTarget y pixel coordinate on the scene
openDoorsbooleanWhether to open closed doors blocking the route (default true)
sceneIdstringOptional Scene ID to scope the token lookup

move_tokens

Move several tokens in a single call - direct by default (like move_token), or wall-aware pathfinding per move when pathfind=true (like move_token_pathfind). Best-effort: one bad move (unknown tokenId, no route found, a rejected write) is reported in a failure list rather than losing moves that already succeeded. Use when: repositioning a whole party or group of NPCs at once - e.g. moving everyone into a room, or resetting an encounter's starting positions - instead of one move_token/move_token_pathfind call per token. Do not use when: moving a single token - move_token/move_token_pathfind is…

ParameterTypeDescription
moves *arrayOne or more token moves to perform in this call

update_token_vision

Update an existing placed token's vision and/or light emission properties (sight range, angle, vision mode, light dim/bright radii, color tint, angle, animation). WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
tokenId *stringThe ID of the token to update
lightAnglenumberLight emission angle in degrees (default 360)
lightAnimationTypestringLight animation type (e.g. "torch", "pulse", "chroma")
lightBrightnumberBright light emission radius in grid units
lightColorstringLight emission color as a 6-digit hex string (e.g. "#ff8800")
lightDimnumberDim light emission radius in grid units
sceneIdstringOptional Scene ID to scope the token lookup
sightAnglenumberVision cone angle in degrees (default 360)
sightEnabledbooleanWhether vision is enabled for this token (automatically set true if sightRange > 0)
sightRangenumberToken vision range in grid units
visionModestringVision mode id (e.g. "basic", "darkvision")

get_chat_messages

Get the most recent chat messages from the game log. Use when: you need recent in-game context - what players said, or roll results that already happened.

ParameterTypeDescription
limitnumberNumber of messages to retrieve (default 20)

send_chat_message

Post a message to the FoundryVTT chat log, optionally under a custom speaker name, whispered to specific users, and/or styled as out-of-character, in-character, or an emote (default: a plain system-style message). Use when: narrating a scene, speaking as an NPC, or sending a player a private clue. Do not use when: you only need to read recent chat - use get_chat_messages. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
content *stringMessage body (HTML or plain text)
speakerstringOptional display name shown as the speaker (e.g. an NPC name)
stylestringMessage style. Omit for a plain message; 'ooc' out-of-character, 'ic' in-character, 'emote' an emote/action line.
whisperToarrayOptional list of User document ids to whisper the message to privately

get_users

List the world's users with their roles and online status. Online status is live while the Socket.IO connection is up: FoundryVTT's userActivity broadcasts are applied to the cached presence list as users connect and disconnect. It stops tracking while that connection is down - get_health_status shows the snapshot as stale until the world is reloaded, on its own once the connection comes back, or with refresh_world_data. Use when: you need to know which user holds the GM role, or who is connected right now.

set_user_role

Change a user's permission role ("none", "player", "trusted", "assistant", "gamemaster"). Refuses self-demotion of the connected MCP user below assistant (3) to prevent accidental GM lockout. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
role *stringNew role level for the user
userId *string16-char alphanumeric User document id

search_journals

Search journal entries by name and page content. Use when: looking for notes, lore, or handouts by keyword. Do not use when: you already have the journalId - use get_journal.

ParameterTypeDescription
query *stringSearch query for journal names and content
limitnumberMaximum number of results

get_journal

Get one journal entry by id with the id and text of each page. By default page bodies are HTML-stripped and each is truncated to its first 500 characters, marked with a trailing "...", so long pages come back partial, and they come from the cached snapshot (flagged when it is stale). Pass raw: true to read the entry from the server instead, with the full, unmodified HTML and the version token of each page (version: <token>) - the expectedVersion update_journal_page requires to replace the content of that page. Use when: you have a journalId and need the text of its pages, or a pageId and the e…

ParameterTypeDescription
journalId *stringThe ID of the journal entry to retrieve
rawbooleanRead the entry from the server and return each page's full, unmodified HTML (text.content) and version token instead of the stripped 500-character preview. Use before rewriting a page so no markup or…

create_journal_entry

Create a new journal entry with one or more text pages, optionally filed under a folder. Defaults to GM-only visibility - pass visibility to let players read it. Use when: recording session notes, lore, or a handout in the world. Returns the id and version token of each created page. Do not use when: adding text to an existing entry - this always creates a new one. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
name *stringTitle of the journal entry
pages *arrayOne or more pages to create on the entry
folderstringOptional Folder document id to file the entry under
visibilitystringWho can see the entry. 'gm-only' (default) hides it from players; 'observer' lets every player read it; 'owner' lets every player read and edit it.

update_journal_page

Edit one page of an existing journal entry. mode "replace" (default) sets a new name and/or replaces the whole page content; mode "append" adds HTML to the end of the page as currently stored on the server. Replacing content requires expectedVersion: read the page with get_journal raw: true, rewrite from that HTML, and pass the version printed for the page - the write is refused, with nothing written, if the page changed since. Every write saves the previous content to a local copy first, and returns the new version token so another edit can follow without re-reading. The response warns when t…

ParameterTypeDescription
journalId *stringThe ID of the journal entry that holds the page
pageId *stringThe ID of the page to edit (shown by get_journal)
contentstringPage body as HTML or plain text. In replace mode it replaces the entire page content; in append mode it is added at the end.
expectedVersionstringVersion token of the page as last read (get_journal raw: true, or the version returned by the previous write). Required to replace content; optional in append mode. The write is refused if the page ha…
modestring'replace' (default) overwrites the page content with content (expectedVersion required) and/or renames it; 'append' adds content after the existing content as read from the server (name not allowed).
namestringNew page title (replace mode only)

add_journal_page

Add a new text page to an existing journal entry, placed after its last page as read from the server. Returns the new page id and version token. Use when: a journal needs another section (a new session, an NPC, a location). Do not use when: the entry does not exist yet - use create_journal_entry; changing an existing page - use update_journal_page. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
content *stringPage body as HTML or plain text
journalId *stringThe ID of the journal entry to add the page to
name *stringPage title

update_journal_entry

Rename a journal entry, move it into another folder, or change who can see it. Only the fields supplied change. Use when: retitling notes, filing them under a folder, or revealing a handout to players. Do not use when: changing page text - use update_journal_page; granting a specific user access - use set_document_ownership. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
journalId *stringThe ID of the journal entry to update
folderstringFolder document id to move the entry into
namestringNew title of the journal entry
visibilitystringWho can see the entry. 'gm-only' hides it from players; 'observer' lets every player read it; 'owner' lets every player read and edit it. Per-user ownership is kept.

delete_journal_entry

Permanently delete a journal entry. Use when: the user explicitly asks to remove outdated notes or a handout. Do not use when: only the content, title, folder or visibility needs to change - use update_journal_page, add_journal_page or update_journal_entry instead. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
journalId *stringThe ID of the journal entry to delete

search_world

Search across all collections (actors, items, scenes, journals) by name, grouped by collection. Use when: you do not know which collection holds what you are looking for. Do not use when: you already know the collection - use search_actors, search_items, or search_journals. Of those, only search_journals prints document ids; for actor and item ids read the foundry://actors and foundry://items resources, each of which lists up to the first 100 documents (not exhaustive in larger worlds).

ParameterTypeDescription
query *stringSearch query to match against entity names
limitnumberMaximum results per collection (default 5)

get_world_summary

Get world metadata (title, game system, core version) and per-collection document counts. Use when: orienting yourself in an unfamiliar world, or confirming the game system before system-specific edits.

refresh_world_data

Force a re-fetch of the cached world data from the FoundryVTT server. Reads are normally served from a cache that follows live document changes for as long as the connection holds, so this is rarely needed. When the connection drops and comes back with the same session, the world is reloaded on its own in the background. Use when: get_health_status still flags the cache as stale (that reload failed, or changes arrived too fast to replay); or a read still looks stale after an out-of-band change. Refreshes the cache only; it does not modify the world.

list_folders

List sidebar folders in the world (id, name, document type, parent folder id, color), optionally filtered by document type (Actor, Item, Scene, JournalEntry, Playlist, RollTable, Cards, Macro, Compendium).

ParameterTypeDescription
typestringOptional document type filter (e.g. "Actor", "JournalEntry", "Item")

list_macros

List Macro documents in the world (id, name, type script/chat, scope, folder, command preview). Use when: discovering available macros or finding a macroId for delete_macro.

list_playlists

List Audio Playlists in the world (id, name, playing state, mode sequential/shuffle/simultaneous, channel, sound track list). Use when: checking background music/ambience state or getting ids for set_playlist_state.

create_folder

Create a new sidebar Folder document to organize actors, items, scenes, journals, playlists, tables, or macros. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
name *stringFolder display name
type *stringDocument type this folder contains: "Actor", "Item", "Scene", "JournalEntry", "Playlist", "RollTable", "Cards", "Macro", or "Compendium"
colorstringOptional folder color as a 6-digit hex string (e.g. "#ff0000")
parentstringOptional parent Folder ID for nested folder hierarchies
sortingstringSorting mode: "a" (alphabetical, default) or "m" (manual)

create_macro

Create a new Macro document (script or chat). Authors and manages the document only — this server has no tool that executes a macro (deliberate security boundary: no arbitrary JS execution in GM browser). WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
command *stringMacro command content/script body
name *stringMacro display name
type *stringMacro type: "script" (JavaScript) or "chat" (chat command)
folderstringOptional Folder ID to file the macro under
imgstringOptional icon image path
scopestringMacro execution scope (default "global")

delete_macro

Permanently delete a Macro document from the world. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
macroId *stringThe ID of the macro to delete

create_playlist

Create a new audio Playlist document with optional starting sound tracks. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
name *stringPlaylist display name
channelstringAudio channel (default "music")
descriptionstringOptional playlist description
fadenumberFade duration in milliseconds
folderstringOptional Folder ID to file the playlist under
modenumberPlayback mode: -1 (soundboard/disabled), 0 (sequential/default), 1 (shuffle), 2 (simultaneous)
soundsarrayOptional sound tracks to create on this playlist

set_playlist_state

Start or stop playback of an entire playlist or a specific sound track within it. Drives Foundry playback state; client autoplay policies may affect audio output. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
playing *booleantrue to start playback, false to stop
playlistId *stringThe ID of the playlist to control
soundIdstringOptional PlaylistSound ID to control a specific track instead of the entire playlist

delete_playlist

Permanently delete an audio Playlist document and its contained sounds. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
playlistId *stringThe ID of the playlist to delete

set_document_ownership

Configure granular ownership permissions for a document. entries maps user IDs (or "default" for all players) to permission levels: "none" (0), "limited" (1), "observer" (2), "owner" (3). Document types supported: Actor, Item, Scene, JournalEntry, RollTable, Macro. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
documentId *string16-char alphanumeric document id
documentType *stringDocument collection the target lives in
entries *arrayList of target and ownership level mappings

list_roll_tables

List the world's roll tables by name, result count, and id. Use when: you need a tableId for roll_table, or want to see what random tables are available. Do not use when: you already have the tableId - go straight to roll_table.

roll_table

Draw a result from a roll table by id, rolling the table's own formula (or a uniform range when it has none) and returning the matched entry. This is a local, read-only draw: unlike FoundryVTT's own table draw, it does not mark the result as drawn or honor a no-duplicates setting, so repeat draws can repeat a result. Use when: rolling on a random encounter, loot, or event table. Do not use when: you don't have a tableId - run list_roll_tables first.

ParameterTypeDescription
tableId *stringThe ID of the roll table to draw from

create_roll_table

Create a new RollTable document with text results. Automatically assigns sequential ranges and a matching 1dN formula when ranges are omitted. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
name *stringRoll table display name
results *arrayList of text result entries for this table
descriptionstringOptional table description
displayRollbooleanWhether the roll total is displayed in chat (default true)
folderstringOptional Folder ID to file the table under
formulastringOptional custom dice formula (e.g. "1d100" or "2d6")
replacementbooleanWhether drawn results are replaced (default true)

delete_roll_table

Permanently delete a RollTable document from the world. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
tableId *stringThe ID of the roll table to delete

capture_scene

Screenshot the active scene as seen on the GM's canvas, with a grid coordinate overlay (column,row per cell) burned in for spatial reasoning. Requires the companion Foundry module to be installed, enabled, and connected - fails with a clear error otherwise. Use when: you need to see the current map layout, token positions, or lighting to reason about it. Do not use when: you just need scene metadata (dimensions, darkness) - use get_scene_info, which needs no module.

get_document_schema

Introspect the connected game system's real DataModel schema for an Actor or Item type - the exact field names, types, string-enum choices, and default values that type accepts, read live from the running system. Works with any installed game system. Returns a nested JSON tree: each field has `type` (Number/String/Boolean/Schema/Array/…), `required`, `choices` for constrained strings, and `initial` for its default value; `fields` holds nested sub-fields, `element` describes an array's entries; `persisted: false` marks a computed field that is never stored (writing it has no effect), and `min…

ParameterTypeDescription
documentType *stringWhich document collection the type belongs to
type *stringThe Actor or Item type to introspect (e.g. "character", "npc", "weapon") - system-specific; list valid types by trying an obviously-wrong one, or check get_world_summary/the system documentation

search_compendium_content

Search compendium packs by name and journal entry text content using the browser-rendered Foundry session. Returns pack IDs, document IDs, names, and text snippet matches. Requires the companion Foundry module to be installed, enabled, and connected. Use when: looking up rules or items in compendiums.

ParameterTypeDescription
limitnumberMaximum number of results to return (default 20)
packTypestringOptional document type to restrict search to (default "JournalEntry", e.g. "Item", "Actor")
querystringText query to search for across pack names and journal contents

roll_and_post

Evaluate a dice formula using Foundry's native Roll engine and post it directly to chat as a rendered, clickable roll card. Supports full Foundry dice syntax (e.g. "4d6kh3", "1d20r1", exploding dice) that the local parser rejects. Requires the companion Foundry module. WRITE: changes the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and the companion module, and is refused otherwise; FoundryVTT additionally enforces the GM permission.

ParameterTypeDescription
formula *stringDice formula to evaluate and post (e.g. "4d6kh3" or "2d6 + 5")
flavorstringOptional flavor/context text displayed above the roll card
rollModestringRoll visibility mode (default "publicroll")
speakerAliasstringOptional custom speaker alias displayed on the chat message
whisperToarrayOptional list of User IDs to whisper the roll to privately

import_compendium_actor

Import a compendium Actor (with its embedded items and effects) as a new top-level world Actor - the gap spawn_token cannot close alone, since it requires an actor that already exists in the world. Best-effort on embedded items: if the game system rejects embedded documents on create, the actor is recreated without them and each item is seeded individually, reporting per-item failures rather than losing the whole import. Requires the companion Foundry module. Use when: adding a creature or NPC from a compendium to the world before spawning its token. Do not use when: the actor already exists i…

ParameterTypeDescription
actorId *stringThe compendium document's own id, as returned by search_compendium_content
compendiumId *stringCompendium pack id the actor lives in (e.g. "world.creatures")
folderIdstringOptional 16-char Folder document id to file the new world actor under
namestringOptional rename for the world actor (default: the compendium name)

set_target

Set or clear this GM user's target selection on the active canvas (renders the targeting reticle in connected player browsers). tokenIds are token document IDs on the currently viewed scene. Requires the companion Foundry module. Use when: directing player attention, declaring targets, or marking a shared target. WRITE: changes the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and the companion module, and is refused otherwise; FoundryVTT additionally enforces the GM permission.

ParameterTypeDescription
tokenIds *arrayList of Token IDs on the active canvas to target (or un-target)
replacebooleanTrue to release all existing targets before setting new ones (default: false)
targetedbooleanTrue to target, false to clear target on the given tokens (default: true)

get_actor_stats

Read the actor's prepared system data, including values the system computes and does not store, as compact JSON. The cached world behind get_actor_details only holds stored data. Give actorId for a world actor, or sceneId + tokenId for one token on a map: a linked token reads its world actor, an unlinked token its own copy (base actor plus the token's changes). paths narrows the answer to some fields; an answer over maxBytes is refused with the size of each top-level key, so you can choose paths. Requires the companion Foundry module 0.6.0 or later. Use when: you need a value the game system d…

ParameterTypeDescription
actorIdstringThe world actor's id. With sceneId + tokenId, optional: it must be the token's actor
maxBytesnumberLargest answer accepted, in bytes of compact JSON (default 32768, at most 65536)
pathsarrayOptional dot paths into system (a "system." prefix is accepted), at most 50. The answer then holds "values" keyed by path and the "missing" paths instead of the whole "system"
sceneIdstringScene of the token to read, together with tokenId
tokenIdstringToken to read (an unlinked token has its own data), together with sceneId

get_targets

List the current target selections of all connected users on the active canvas. Returns each user with the tokens they currently have targeted. Requires the companion Foundry module. Use when: checking who players are aiming at or focusing on.

ping_canvas

Emit an animated canvas ping at specific pixel coordinates on the active scene's view, drawing every connected player's camera and attention to that exact location. Requires the companion Foundry module. Use when: pointing out a trap, landmark, or hidden detail on the map. WRITE: changes the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and the companion module, and is refused otherwise; FoundryVTT additionally enforces the GM permission.

ParameterTypeDescription
x *numberPixel x coordinate to ping
y *numberPixel y coordinate to ping
sceneIdstringOptional scene id (fails if the GM canvas is viewing a different scene)

set_pause

Pause or unpause the game clock. When paused, token movement and real-time combat timers freeze for players. Requires the companion Foundry module. Use when: stepping away, narrating a long cutscene, or resolving a complex rules question. WRITE: changes the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and the companion module, and is refused otherwise; FoundryVTT additionally enforces the GM permission.

ParameterTypeDescription
pausedbooleanTrue to pause, false to unpause (omit to toggle)

upload_asset

Upload a file (image, audio, etc.) into FoundryVTT's Data storage via the GM browser's FilePicker, returning the Foundry-relative path to feed directly into create_scene (backgroundSrc), create_tile (src), or create_sound (path). Provide exactly one of contentBase64 (base64-encoded file content) or sourcePath (a file inside the folder named by FOUNDRY_UPLOAD_SOURCE_DIR, which the server reads; refused when that setting is unset). Only media files: .png, .jpg, .jpeg, .webp, .gif, .mp3, .ogg, .wav, .m4a, .webm, .mp4, and filename must have the source file's extension. targetDir is a folder relat…

ParameterTypeDescription
filename *stringDestination file name with a media extension (e.g. "map.png"), no folder
targetDir *stringDestination folder relative to the Data storage (e.g. "assets/uploads"); no ".." and no absolute path
contentBase64stringBase64-encoded file content. Mutually exclusive with sourcePath.
mimeTypestringOptional MIME type; must be the one of the filename extension, which is used when omitted
sourcePathstringPath of a file inside the FOUNDRY_UPLOAD_SOURCE_DIR folder (refused when that setting is unset). Mutually exclusive with contentBase64.

watch_events

Wait for and return world activity since a cursor - chat messages, token/actor/combat updates, door state changes, user connect/disconnect, and canvas targeting - instead of re-polling get_chat_messages/get_combat_state in a loop. Blocks for up to waitMs (default 25000, max 120000) if nothing has happened yet, returning as soon as something does; pass 0 to check without waiting. Your MCP client's own request timeout must exceed waitMs or the call will appear to fail while still running server-side. Always pass the returned nextCursor back as `cursor` on your next call - it is required to avoid…

ParameterTypeDescription
actionsarrayRestrict to these actions, e.g. ["create","update"] (default: all)
cursorstring"now" (default) to start from this moment, "oldest" for the full retained buffer, or a nextCursor value from a previous call
excludeSelfbooleanDrop events caused by this server's own account (default true). FoundryVTT does not send a client the broadcast of its own writes, so on v14 the connector's writes never reach the event log and false…
kindsarrayRestrict to these event kinds (default: all)
limitnumberMaximum events to return in one call (default 50, max 200)
sceneIdstringRestrict to events on this scene (default: all scenes)
typesarrayRestrict to these document names, e.g. ["ChatMessage","Token","Combat"] (default: all)
waitMsnumberMilliseconds to block waiting for a new event before returning empty (default 25000, max 120000, 0 = return immediately)

create_actor_effect

Create a general-purpose ActiveEffect on an actor with mechanical changes (attribute modifiers) and/or a duration - not just a status toggle (use apply_status_effect for that). Give actorId alone for a world actor, or actorId plus the sceneId+tokenId pair for one token: a linked token writes its world actor, an unlinked token only that token (its own copy of the actor), never the base actor or its other tokens. The token must carry actorId. changes[].mode is a named FoundryVTT ACTIVE_EFFECT_MODES combine rule (add/multiply/override/upgrade/downgrade/custom), not a raw number. Use when: applyin…

ParameterTypeDescription
actorId *stringThe actor's own document id
name *stringEffect display name
changesarrayMechanical changes this effect applies
descriptionstringOptional effect description text
disabledbooleanCreate the effect already disabled (default false)
durationobjectOptional effect duration
imgstringOptional icon image path
sceneIdstringScene id, required together with tokenId for an unlinked token actor
statusesarrayOptional status condition ids this effect also represents
tokenIdstringToken id, required together with sceneId for an unlinked token actor

update_actor_effect

Update fields on an existing ActiveEffect - every field replaces the corresponding one on the existing document, omitted fields are left as they are. Same actorId/sceneId+tokenId resolution as create_actor_effect: on an unlinked token only that token changes, even for an effect it inherits from its base actor. Use when: a buff's remaining duration changes, or its magnitude scales. Do not use when: the effect should end - use delete_actor_effect. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Found…

ParameterTypeDescription
actorId *stringThe actor's own document id
effectId *stringThe ActiveEffect document id to update
changesarrayReplacement mechanical changes
descriptionstringNew effect description text
disabledbooleanEnable/disable the effect
durationobjectReplacement effect duration
imgstringNew icon image path
namestringNew effect display name
sceneIdstringScene id, required together with tokenId for an unlinked token actor
statusesarrayReplacement status condition ids
tokenIdstringToken id, required together with sceneId for an unlinked token actor

delete_actor_effect

Delete an ActiveEffect from an actor. Same actorId/sceneId+tokenId resolution as create_actor_effect: on an unlinked token only that token loses the effect, even one it inherits from its base actor. DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
actorId *stringThe actor's own document id
effectId *stringThe ActiveEffect document id to delete
sceneIdstringScene id, required together with tokenId for an unlinked token actor
tokenIdstringToken id, required together with sceneId for an unlinked token actor

list_actor_effects

List the ActiveEffects on an actor, read from the cached world snapshot (no socket round trip). Give actorId for a world actor, or sceneId + tokenId for one token: an unlinked token lists its own effects (those it inherits from its base actor and its own, without the ones removed from it), a linked token its world actor's. Use when: checking what buffs/debuffs are currently active on an actor before applying another.

ParameterTypeDescription
actorIdstringThe actor's own document id (omit when giving sceneId + tokenId)
sceneIdstringScene id of the token, required together with tokenId
tokenIdstringToken id: lists the effects of that token's own actor (base actor and the token's changes merged, for an unlinked token) instead of actorId

list_regions

List the Scene Regions placed on a scene (FoundryVTT v12+). Regions are polygon/circle/rectangle areas that trigger behaviors when tokens enter, move through, or leave them. Use when: inspecting traps, teleport pads, atmospheric zones, or scripted triggers on a map.

ParameterTypeDescription
sceneIdstringOptional scene id; defaults to the currently active scene

create_region

Create a new Scene Region with shapes and/or automated behaviors (FoundryVTT v12+). Shapes use pixel coordinates (use get_scene_info/find_open_cells to convert from grid cells). Documented behaviors include teleportToken ({ destination: <region UUID> }), displayScrollingText ({ text, color, visibility }), adjustDarknessLevel ({ mode, modifier }), and pauseGame ({ once }); custom system/module behavior types pass through untouched. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally…

ParameterTypeDescription
name *stringRegion display name
behaviorsarrayAutomated behaviors triggered when tokens interact with the region
colorstringOptional 6-digit hex color for canvas rendering (e.g. "#ff8800")
elevationobjectOptional 3D vertical bounds (null for unbounded)
sceneIdstringOptional scene id; defaults to the currently active scene
shapesarrayPixel-coordinate geometric shapes defining the region boundary
visibilitynumber0 = hidden from players, 1 = visible to players (default: 0)

delete_region

Delete a Scene Region from a scene (FoundryVTT v12+). DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
regionId *stringThe Region document id to delete
sceneIdstringOptional scene id; defaults to the currently active scene

generate_npc

Generate a random fantasy-style NPC as text, from built-in lists that do not depend on the game system of the world (name, people, profession, hit points, ability values, background). Use when: the user needs a throwaway NPC on the spot. Do not use when: the NPC must exist in FoundryVTT - this creates no documents, and the result still has to be entered into the world by hand.

ParameterTypeDescription
classstringCharacter class (optional)
levelnumberCharacter level (1-20)
racestringCharacter race (optional)

generate_loot

Generate random fantasy-style treasure for an encounter as text, from built-in tables that do not depend on the game system of the world. Only the coin amounts vary: they scale with challengeRating, while the item list is fixed (a healing potion and a silver ring) and the treasureType argument is accepted but not used. Use when: the user wants a quick coin total for an encounter. Do not use when: the loot should end up in an actor's inventory - this creates no documents; use create_actor_item for that.

ParameterTypeDescription
challengeRatingnumberDifficulty of the encounter; the coin amounts scale with it
treasureTypestringType of treasure (hoard, individual, etc.). Accepted but not used - the generated result is the same whichever value is passed.

lookup_rule

Search rules and mechanics across world journals and compendium journal packs. Compendium search requires the companion Foundry module.

ParameterTypeDescription
query *stringRule, keyword, or mechanic to look up

get_world_setting

Read a world setting by its namespaced key (e.g. "my-module.customSetting" or "simple-calendar.year"). If the setting has never been modified from its system/module default, exists will be false. Use when: inspecting world configuration.

ParameterTypeDescription
key *stringThe namespaced setting key in the format {scope}.{field}

set_world_setting

Update or create a world setting value for a system or module namespace (e.g. "my-module.settingName"). Refuses writes to the "core.*" namespace (core settings control the Foundry client itself and can break the world; change those in the UI). DESTRUCTIVE and not undoable from this server: confirm the exact target with the user before calling. WRITE: mutates the live world. Requires FOUNDRY_WRITE_ENABLED=true (default false) and an active Socket.IO connection, and is refused otherwise; Foundry additionally enforces GM/owner permission on the document.

ParameterTypeDescription
key *stringThe namespaced setting key in the format {scope}.{field} (non-core only)
value *The value to store (JSON-serializable: string, number, boolean, object, or array)

get_recent_logs

Get recent FoundryVTT server log entries, optionally filtered by level or since a timestamp. Use when: investigating an error or recent server behaviour. Do not use when: you have a specific term to look for - use search_logs. Requires the REST API module (FOUNDRY_API_KEY); fails without it.

ParameterTypeDescription
levelstringLog level filter (debug, info, warn, error)
limitnumberNumber of log entries to retrieve
sincestringGet logs since this timestamp (ISO format)

search_logs

Search the FoundryVTT server logs for a query string and list the matching entries. Use when: hunting a specific error message, stack trace, or module name. Do not use when: you just want the latest entries - use get_recent_logs. The reported match count is the server's total for the query, while limit caps how many of those entries are rendered (default 50, hard cap 1000). Level filtering accepts info, warn and error; "debug" is not a level this log store records, so it is reported back as unsupported and no level filter is applied. Requires the REST API module (FOUNDRY_API_KEY); fails withou…

ParameterTypeDescription
query *stringSearch query for log contents
levelstringLog level filter; "debug" is not recorded by this log store and is not applied
limitnumberMaximum number of matched entries to render (capped at 1000)

get_system_health

Get the FoundryVTT server's health report: the overall status (healthy, warning, or critical), FoundryVTT and game-system versions, world id and uptime, active/total user counts with the number of GMs, active/installed module counts, connected clients, heap and RSS memory, and the log buffer size with recent error/warning counts and error rate. CPU and disk are not reported - the diagnostics response models no such fields - and the uptime and memory lines are omitted when the server does not supply them. Use when: you want the server's own view of its health. Do not use when: you also want con…

diagnose_errors

Retrieve error diagnosis and health analysis from the FoundryVTT server logs via the REST API module (FOUNDRY_API_KEY). Reports error categories, health score, actionable suggestions, and recent errors.

ParameterTypeDescription
categorystringOptional error category to filter summary and logs (e.g. "socket", "database")
timeframenumberTimeframe in seconds to analyze (default 3600)

get_health_status

Get a combined health report: MCP-to-FoundryVTT connection state, world title/system/core version, and the server's health status with its active/total user counts, uptime, heap memory and recent error/warning counts. The world section is prefixed with a stale marker when the cached snapshot stopped following live document changes - typically a dropped connection, until the world is reloaded once it comes back (on its own, or with refresh_world_data). The connection line is a live read of the socket on the default Socket.IO transport, so it follows a link that drops or comes back in both direc…