foundry-rest-api-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@foundry-rest-api-mcp-servercreate a goblin boss creature"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
foundry-rest-api-mcp-server
An MCP (Model Context Protocol) server that wraps the ThreeHats Foundry VTT REST API relay, so an LLM agent (Claude Code / Claude Desktop) can author and manage Foundry VTT content — primarily creating D&D 5e creatures — through native MCP tools instead of raw HTTP calls.
Status: V1 implemented. The stdio MCP server lives under
src/with unit tests undertest/. See Install & configure below to run it. The original plan that drove the build is inIMPLEMENTATION_PLAN.md.
What this is
The relay (github.com/ThreeHats/foundryvtt-rest-api-relay, public host https://foundryrestapi.com) bridges a running Foundry world to a REST API over a WebSocket. A Foundry-side module connects out to the relay; external clients then call REST endpoints, authenticating with an x-api-key header and targeting a world via a clientId query param.
This MCP server is a thin, typed client of that relay. It does not talk to Foundry directly and requires no Foundry-side code of its own (the relay's module handles that). That is the key differentiator from existing Foundry MCP servers, which all ship a custom Foundry module + socket (see IMPLEMENTATION_PLAN.md § Prior Art).
Related MCP server: mcp-llm
v1 scope (locked)
v1 implements the relay's document-authoring surface — these five scopes only:
Scope | Endpoints | Capability |
|
| Discover connected worlds → pick |
|
| Find actors/items/etc. by name (world + compendiums) |
|
| Read any document (by UUID or current selection) |
|
| Create / update / delete documents; tweak actor inventory & attributes |
|
| Organize content into folders |
This delivers the headline use case end-to-end: build a dnd5e NPC/monster (abilities, HP, AC, CR, traits, embedded attacks) as a real Foundry actor, search/read existing creatures to clone-and-tweak, and file everything into folders.
Everything else in the relay (dice rolls, chat, encounters/combat, scenes, canvas/tokens, effects, files, users, macro execution, streaming events) is out of v1 scope and documented as clearly-marked Future Phases — each unlocks by adding one scope and one tool module.
Optional companion: adding
structure:read(GET /structure,GET /get-folder) would let us find existing folders, not just create them. Cheap and read-only; deferred for now.
Architecture decisions (the short list)
Language/runtime: TypeScript, Node ≥ 18 (target Node 20 LTS), ESM-only.
SDK:
@modelcontextprotocol/sdk@^1.29(the shipped 1.x line). The renamed V2 SDK (@modelcontextprotocol/server) is not stable until ~mid-2026; migration later is mechanical. Build on 1.x now.Transport: stdio.
HTTP: native
fetch(no axios).Validation:
zod(peer of the SDK).Build/package:
tsup→ singlenpx-runnable bin.Config: env vars —
FOUNDRY_API_KEY(thex-api-key),FOUNDRY_RELAY_URL(defaulthttps://foundryrestapi.com),FOUNDRY_CLIENT_ID(optional; auto-resolves if one world is online),FOUNDRY_USER_ID(optional; omit = GM-level).Tool surface: small set of mostly single-purpose tools (~9 in v1), façades only where operations are homogeneous. Per-endpoint-explosion is explicitly avoided — LLM tool-selection reliability degrades past ~30–40 tools and every tool is permanent context cost.
Install & configure
Build from source
npm install
npm run build # → dist/index.js (executable, #!/usr/bin/env node)
npm test # unit tests (mocked fetch)
npm run inspect # launch the MCP Inspector against dist/index.jsEnvironment variables
Var | Required | Default | Purpose |
| yes | — | Sent as the |
| no |
| Relay base URL. Set to |
| no | auto-resolves | Which connected world to target. Auto-resolves when exactly one world is online. |
| no | GM-level | Scope actions to a Foundry user's permissions. Omit for GM access. |
On startup the server logs the online world(s) to stderr and disables foundry_create_creature if the active world's system isn't dnd5e.
Tools (v1)
foundry_list_worlds · foundry_search · foundry_get_entity · foundry_create_entity · foundry_update_entity · foundry_delete_entity · foundry_modify_actor · foundry_create_creature · foundry_manage_folder
Claude Code (.mcp.json)
Add to .mcp.json in your project root (or via claude mcp add):
{
"mcpServers": {
"foundry": {
"command": "node",
"args": ["/absolute/path/to/foundry-rest-api-mcp-server/dist/index.js"],
"env": {
"FOUNDRY_API_KEY": "your-scoped-key",
"FOUNDRY_CLIENT_ID": "fvtt_8bfa06d76c0c1ac5"
}
}
}
}Claude Desktop (claude_desktop_config.json)
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"foundry": {
"command": "node",
"args": ["/absolute/path/to/foundry-rest-api-mcp-server/dist/index.js"],
"env": {
"FOUNDRY_API_KEY": "your-scoped-key",
"FOUNDRY_CLIENT_ID": "fvtt_8bfa06d76c0c1ac5"
}
}
}
}Once published to npm, replace
"command": "node", "args": ["…/dist/index.js"]with"command": "npx", "args": ["-y", "foundry-rest-api-mcp-server"].
Live smoke test (optional)
A gated end-to-end test creates then deletes a throwaway JournalEntry against the real relay:
FOUNDRY_LIVE_TEST=1 FOUNDRY_API_KEY=... FOUNDRY_CLIENT_ID=... npm testHow to use this repo (for the implementing agent)
Read
IMPLEMENTATION_PLAN.mdtop to bottom. Work the phases in order; each step lists its goal, the files it touches, the exact work, and an acceptance check.Read
EXECUTION_STRATEGY.mdfor how to run the build — recommended model/effort per ticket, the sequential-foundation → parallel-fan-out → sequential-convergence order, and the branch-per-work-stream (trunk-based) strategy with worktrees + CI gates.Use
API_SPEC.mdas the authoritative endpoint reference (request/response shapes, scopes, quirks, the dnd5e NPC schema notes).Pull granular, ordered tasks from the V1 project board / issues (milestone
V1 — Content Authoring). Each issue carries goal, endpoint+scope, file paths, acceptance criteria, andDepends on #N.The
reference/folder holds the relay's own docs/examples, mirrored verbatim from the upstream MIT-licensed repo for offline ground-truth (attribution inreference/SOURCE.md; regenerate withscripts/fetch-reference.sh). Filenames mirror their repo paths (e.g.docs_md_api_entity.md,docs_examples_dnd5e-examples.json).
Decision records & specs
decisions/— architecture & management decisions as ADRs, numberedNNNN-*.md. Each captures one decision (status · context · decision · consequences) and is immutable once Accepted; a later ADR supersedes an earlier one by reference, so history is never edited in place. Index + convention:decisions/README.md.specs/— technical component specs, numberedNNNN-*.md— the internal contracts the code implements (relay client, tool surface, dnd5e NPC builder). Index:specs/README.md.
The top-level docs (IMPLEMENTATION_PLAN.md, EXECUTION_STRATEGY.md, API_SPEC.md) are the elaborated references; the ADRs are the atomic, supersede-able record of why.
Getting a properly-scoped API key (do this before any write works)
A read-only key returns 403 API key lacks required scope: entity:write. You cannot add scopes to an existing key value — mint a new one that includes all five v1 scopes:
Dashboard: log in at
https://foundryrestapi.com→ API Keys → Create Scoped Key → tickclients:read,search,entity:read,entity:write,structure:write→ copy the key (shown once).Programmatic (device flow):
POST /auth/key-requestwith{"appName":"foundry-mcp","scopes":["clients:read","search","entity:read","entity:write","structure:write"]}→ open the returnedapprovalUrl→ pollGET /auth/key-request/:code/statusuntilapproved(the response then includesapiKey).
The known target world for this project is "Wilds Beyond the Witchlight", clientId fvtt_8bfa06d76c0c1ac5 (dnd5e 5.2.2, Foundry v13.351).
Available Tools
9 toolsfoundry_create_creatureCreate dnd5e NPCA
Build a dnd5e 5th-edition NPC actor from a friendly schema and create it in Foundry. Returns the new actor UUID and document. Only available when the connected world is dnd5e. ⚠️ Attack schema targets dnd5e v5.2.2 activities model — verify against a live NPC if attacks look wrong.
| Name | Required | Description | Default |
|---|---|---|---|
| ac | Yes | Armor class (flat/natural) | |
| cr | Yes | Challenge rating, e.g. 0.25 or 6 | |
| hp | Yes | ||
| name | Yes | NPC name | |
| size | Yes | tiny|sm|med|lg|huge|grg | |
| type | Yes | Creature type, e.g. "beast", "monstrosity", "humanoid" | |
| folder | No | Folder UUID to file into | |
| senses | No | ||
| speeds | No | ||
| userId | No | Override the default userId. Omit for GM-level access. | |
| attacks | No | ||
| clientId | No | Override the default clientId (which connected world to target) | |
| features | No | ||
| abilities | Yes | ||
| alignment | No | e.g. "Chaotic Evil" | |
| biography | No | ||
| languages | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide openWorldHint and idempotentHint, but no readOnly/destructive hints. The description adds valuable behavioral context: it returns 'the new actor UUID and document,' is restricted to dnd5e worlds, and warns that the attack schema targets dnd5e v5.2.2 activities model with advice to verify against a live NPC. These details go beyond what annotations convey.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences long, front-loaded with the core purpose and action. The warning about the attack schema is necessary and concise. Every sentence earns its place without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 17 parameters, nested objects, and no output schema, the description provides crucial context: the dnd5e-only constraint, return type, and attack schema warning. However, it does not explain the 'friendly schema' terminology or edge cases like duplicate names or non-idempotent behavior beyond the annotation. It is fairly complete for a complex tool but leaves some questions unanswered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 53%, so a significant portion of parameters lack explicit descriptions. The tool description does not explain any specific parameters; it only calls the schema 'friendly' and mentions the attack schema caveat. It does not compensate for undocumented nested structures like abilities, speeds, or senses, offering minimal added value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Build a dnd5e 5th-edition NPC actor from a friendly schema and create it in Foundry.' This specifies the action (build/create), resource (dnd5e NPC actor), and differentiates from generic sibling tools like foundry_create_entity by being dnd5e-specific. The title 'Create dnd5e NPC' reinforces the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a clear precondition: 'Only available when the connected world is dnd5e.' This implies the tool is intended for dnd5e worlds and NPC creation. However, it does not explicitly mention alternatives like foundry_create_entity for non-dnd5e scenarios, so it lacks explicit when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
foundry_create_entityCreate Foundry EntityA
Create a new Foundry entity (Actor, Item, JournalEntry, etc.) with a raw Foundry document. Returns the new entity UUID and document.
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Raw Foundry document for this entityType (name, type, system, items, etc.) | |
| folder | No | UUID of folder to file the entity in | |
| keepId | No | Keep the supplied _id | |
| userId | No | Override the default userId. Omit for GM-level access. | |
| clientId | No | Override the default clientId (which connected world to target) | |
| override | No | Override an existing entity with the same _id | |
| entityType | Yes | Foundry document class, e.g. Actor or JournalEntry |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description confirms it creates a new entity and returns the new UUID/document, consistent with openWorldHint=true and idempotentHint=false. However, it doesn't detail what happens to existing data, permission requirements, or failure modes beyond what annotations already imply. Minimal added context beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the action, and no redundant information. Each word adds value, and it efficiently communicates purpose and return value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The schema and annotations handle many details, and the description states the return value. However, it lacks guidance on when to use this vs. sibling create tools, and it doesn't mention edge cases like override behavior or folder constraints, making it adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description only repeats 'raw Foundry document' in the body, which mirrors the schema's data parameter description. It adds no extra insight into folder, override, or userId semantics beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it creates a new Foundry entity with a raw Foundry document and lists supported types (Actor, Item, JournalEntry). The verb 'create' and resource 'Foundry entity' are specific, and it differentiates from siblings by focusing on raw document creation and returning a UUID.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for creating entities, but offers no explicit comparison to alternatives like foundry_create_creature or foundry_update_entity. It provides no when-not guidance or exclusions, leaving the agent to infer when this raw-document approach is preferred over specialized creation tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
foundry_delete_entityDelete Foundry EntityADestructive
Permanently delete a Foundry entity by UUID or current selection. This action is irreversible.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | No | Entity UUID | |
| userId | No | Override the default userId. Omit for GM-level access. | |
| clientId | No | Override the default clientId (which connected world to target) | |
| selected | No | If true, delete the currently selected entity |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already flag destructiveHint: true, but the description adds valuable context by stating the deletion is 'Permanent' and 'irreversible.' It also discloses that the operation can target by UUID or current selection, going beyond the bare annotation to convey the action's finality and flexibility.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two succinct sentences that front-load the action and key detail (UUID or selection). Every word earns its place; there is no redundant information or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is straightforward, supported by full schema coverage and the destructiveHint/openWorldHint annotations. The description adds the critical fact of irreversibility. It doesn't delve into side effects like child deletions, but for a simple delete operation, the covered points are sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description mentions 'by UUID or current selection,' which aligns with the uuid and selected parameters, but adds no further meaning beyond what the schema already documents. No additional insight is provided for userId or clientId overrides, so the baseline score stands.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Permanently delete a Foundry entity by UUID or current selection.' This specifies the verb (delete), resource (Foundry entity), and method (by UUID or selection), distinguishing it from sibling tools like create, update, and search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool (when you want to delete an entity) and the two ways to target it (UUID or current selection). It does not explicitly cite alternatives, but the purpose is unmistakable given the tool name and sibling set, meeting the 'clear context, no exclusions' criterion.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
foundry_get_entityGet Foundry EntityARead-only
Retrieve a Foundry entity by UUID, or the currently selected token/actor. Returns the full document including system data and embedded items.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | No | Entity UUID, e.g. Actor.2midVQ1laJFMrN4D | |
| actor | No | If true with selected=true, return the Actor of the selected token | |
| userId | No | Override the default userId. Omit for GM-level access. | |
| clientId | No | Override the default clientId (which connected world to target) | |
| selected | No | If true, return the currently selected token/entity |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With annotations already indicating readOnlyHint=true and openWorldHint=true, the description adds useful context by stating the return value includes the full document with system data and embedded items. It also clarifies the selected token/actor behavior, increasing transparency beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary purpose followed by return details. Every word earns its place; no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only retrieval tool with no output schema, the description sufficiently explains what it returns (full document, system data, embedded items) and its two modes (UUID or selected). It does not over-explain, but given the simplicity and annotations, it is complete enough for an agent to use effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already has 100% coverage with descriptions for all five parameters. The tool description adds minimal extra meaning—it mentions 'by UUID or selected' which aligns with the uuid and selected params, but does not further elaborate on parameter behavior or format. Baseline 3 is appropriate given high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a Foundry entity by UUID or the currently selected token/actor. This uses a specific verb ('Retrieve') and resource ('Foundry entity'), and the two modes distinguish it from sibling tools like delete, create, and update.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description conveys clear usage context: use it to get an entity by UUID or selected token/actor. It does not explicitly mention alternatives, but the sibling tool names (e.g., foundry_search, foundry_update) imply when this read-only retrieval tool is appropriate. No exclusions are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
foundry_list_worldsList Foundry WorldsARead-only
List all Foundry VTT worlds/clients connected to the relay, including their online status, system, and version info.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, so the description doesn't need to repeat safety. It adds value by disclosing the return fields (online status, system, version info), which is useful behavioral context. However, it doesn't go into detail about pagination or error behavior, but given the simplicity of the tool, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that immediately states the tool's purpose and the key output data. It is front-loaded with the action and resource, with no filler or redundant content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with no parameters, the description fully conveys what is returned (worlds/clients, online status, system, version). The lack of output schema is compensated by the explanation of returned fields. The context of 'connected to the relay' clarifies the scope, making the tool complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so the description has no parameter semantics to explain. Baseline for 0 parameters is 4, and the description properly avoids inventing any required arguments. It doesn't add parameter-level detail because none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'List' with a clear resource 'Foundry VTT worlds/clients connected to the relay'. It distinctly differs from sibling tools like foundry_delete_entity or foundry_search, which handle entities and search operations. The scope is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: whenever you need an overview of all connected worlds/clients with their status. It doesn't explicitly mention alternatives or exclusions, but the list operation is naturally distinct from the other CRUD/search tools. The context is clear enough without needing to name alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
foundry_manage_folderManage Foundry FolderADestructive
Create or delete a Foundry folder. After creating a folder, pass the returned uuid as the folder argument when creating entities. Limitation: finding existing folders requires structure:read (not in v1 scope) — only freshly-created folder UUIDs are known.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | [create] Folder name | |
| action | Yes | create or delete | |
| userId | No | Override the default userId. Omit for GM-level access. | |
| clientId | No | Override the default clientId (which connected world to target) | |
| folderId | No | [delete] UUID/id of the folder to delete | |
| deleteAll | No | [delete] If true, also delete all entities inside the folder (irreversible) | |
| folderType | No | [create] Document class this folder holds, e.g. Actor or Item | |
| parentFolderId | No | [create] UUID of parent folder (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite annotations already indicating destructive hint and open world, the description adds valuable behavioral context: the workflow for using the returned uuid, and the limitation that only freshly-created folder UUIDs are known (requiring structure:read for discovery). This goes beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose, and adds a valuable usage note and limitation. Every sentence earns its place with no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 8-parameter schema and no output schema, the description provides enough context for the main workflow and a key limitation. It could mention more about error cases or return format, but the schema covers parameter details, and the description conveys the essential operational flow.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameters are fully explained in the schema. The description mentions the returned uuid from creation, but doesn't add semantic detail about individual parameters beyond what the schema already provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Create or delete a Foundry folder.' This is specific with a verb and resource, and it distinguishes from sibling tools which focus on entities, worlds, and search. No ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: after creating a folder, pass the returned uuid as the folder argument when creating entities. It also notes a key limitation about not being able to find existing folders without structure:read, which guides when to rely on freshly-created uuids. It doesn't explicitly name alternatives, but none exist among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
foundry_modify_actorModify Foundry ActorA
Give/remove items, increase/decrease numeric attributes, or kill (set HP to 0) an actor. Use action to select the operation.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | No | [increase/decrease/kill] UUID of the target actor | |
| action | Yes | Operation: give/remove items, increase/decrease a stat, or kill | |
| amount | No | [increase/decrease] Amount to change | |
| toUuid | No | [give] UUID of the actor receiving the item | |
| userId | No | Override the default userId. Omit for GM-level access. | |
| clientId | No | Override the default clientId (which connected world to target) | |
| fromUuid | No | [give] UUID of the actor to transfer the item from | |
| itemName | No | [give/remove] Name of the item (if UUID unknown) | |
| itemUuid | No | [give/remove] UUID of the item | |
| quantity | No | [give/remove] Quantity | |
| selected | No | [increase/decrease/kill/remove] Use current selection | |
| actorUuid | No | [remove] UUID of the actor to remove the item from | |
| attribute | No | [increase/decrease] Dotted attribute path, e.g. system.attributes.hp.value |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds one meaningful behavioral detail: 'kill (set HP to 0)' clarifies the exact effect of the kill action. However, it does not disclose other behavioral traits like whether give/remove permanently alter inventories, whether changes are reversible, or whether permissions beyond openWorldHint are required. Since annotations only include openWorldHint, the description carries a moderate transparency burden and meets it only partially.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, immediately lists the core operations, and avoids redundant filler. It is front-loaded with the most critical info and earns its place without unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the schema covering parameters, the tool is complex with 13 parameters and no output schema. The description does not explain return values, error conditions, or how the action determines required parameters beyond a one-liner. It also omits preconditions like whether the actor must exist or be in the world. For a tool that can kill or remove items, this level of incompleteness is a notable gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage for parameter descriptions, so the description adds little semantic value. It does reinforce that 'action' selects the operation, but the schema already enumerates the actions with descriptions. The mapping between action and parameter groups is handled by bracket prefixes in the schema, not the description, so the description does not significantly enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as modifying Foundry actors, listing specific operations (give/remove items, increase/decrease attributes, kill/set HP to 0). This distinguishes it from sibling tools like foundry_delete_entity or foundry_update_entity by focusing on actor mutations rather than entity lifecycle management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'Use action to select the operation' provides some guidance on how to invoke the tool, but it does not explicitly state when to use this tool versus alternatives such as foundry_update_entity or foundry_create_creature. There is no mention of exclusions or fallback conditions, so the usage context is implied rather than clearly delineated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
foundry_searchSearch Foundry EntitiesARead-only
Search for Foundry entities by name. Returns UUID, documentType, subType, and package. This is the primary way to turn a name into a UUID for use with other tools. Use filter to narrow results, e.g. "Actor" or "documentType:Item,subType:weapon".
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results (default 50, max 500) | |
| query | Yes | Search term, e.g. 'goblin' or 'longsword' | |
| filter | No | Simple: "Actor". Compound: "documentType:Item,subType:weapon". Keys: documentType, subType, folder, package, resultType. | |
| userId | No | Override the default userId. Omit for GM-level access. | |
| clientId | No | Override the default clientId (which connected world to target) | |
| minified | No | Return slim results (uuid/id/name/img/documentType only). Default true. | |
| excludeCompendiums | No | Exclude compendium results |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint and openWorldHint, so the description adds value by specifying the return fields and giving concrete filter examples. This enriches the agent's understanding of behavior without contradicting annotations. It could mention pagination or empty-result behavior, but the additional context is valuable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, front-loaded with the primary purpose, and includes a concrete filter example. Every sentence is informative, with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential purpose, return fields, and usage context, which is sufficient given the tool's simplicity and the complete schema annotations. Minor omissions like pagination or error behavior are acceptable for a search tool with read-only annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All parameters have detailed descriptions in the schema, so the description adds little beyond that. The filter example in the description overlaps with the schema description, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it searches for Foundry entities by name and returns UUID, documentType, subType, and package. It also positions itself as 'the primary way to turn a name into a UUID for use with other tools,' which distinguishes it from sibling CRUD tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly frames the tool's role as the name-to-UUID lookup, giving a clear when-to-use context. It does not name specific alternatives, such as foundry_get_entity, but the implication is present. This is clear context without explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
foundry_update_entityUpdate Foundry EntityAIdempotent
Update an existing Foundry entity by UUID or current selection. Pass only the fields to change.
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Partial Foundry document — only changed fields | |
| uuid | No | Entity UUID | |
| actor | No | With selected=true, target the actor of the selected token | |
| userId | No | Override the default userId. Omit for GM-level access. | |
| clientId | No | Override the default clientId (which connected world to target) | |
| selected | No | If true, update the currently selected entity |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations (openWorldHint, idempotentHint) provide some context, and the description adds useful behavioral detail: it is a partial update (only changed fields are sent) and can target either a UUID or the current selection. It does not explain side effects on persisted world data or auth behavior, but with annotations present this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, focused sentences. There is no filler or repetition, and the key usage instructions are front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With six parameters, a nested data object, and no output schema, the description is too thin to be fully actionable. It does not explain how uuid and selected interact, when to use actor or userId/clientId, or what the tool returns after an update. The schema lists parameters but the description fails to synthesize them into a coherent usage flow, leaving meaningful gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already covers 100% of parameters with descriptions, so the schema carries the heavy lifting. The description reinforces the meaning of 'data' by saying 'only fields to change,' but it does not clarify interactions between uuid, selected, actor, or userId beyond what the schema states, so no significant extra semantic value is added.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Update') with a clear resource ('existing Foundry entity') and two targeting modes (UUID or current selection), which immediately distinguishes it from siblings like create, delete, and get. 'Pass only the fields to change' further clarifies the PATCH-like intent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'existing entity' makes clear it is not for creation or deletion, and 'by UUID or current selection' explains the primary usage modes. However, it does not explicitly mention when to prefer this over foundry_modify_actor or other siblings, so it stops short of full when/when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Most tools have distinct purposes (search vs get vs delete vs create), but there is some overlap between generic update_entity and specialized modify_actor, and between create_entity and create_creature. Descriptions help clarify boundaries, though agents might occasionally misselect.
Tool names follow a consistent 'foundry_' prefix with snake_case, and most use verb_noun patterns (list_worlds, create_entity, update_entity). Minor deviations: 'foundry_search' lacks a noun, and 'foundry_manage_folder' uses the vaguer verb 'manage' instead of create/delete.
Nine tools is well-scoped for a Foundry REST API server, covering core entity operations, world listing, search, and specialized dnd5e helpers without unnecessary bloat.
The set provides full CRUD for entities, search, and world listing, plus useful specialized tools for actor modification and creature creation. Minor gaps exist like no generic list_entities operation, but agents can work around these.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2
MCP server for AI dialogue using various LLM models via AceDataCloud
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- MIT
- MIT
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that integrates with FoundryVTT, allowing AI assistants to interact with tabletop gaming sessions through natural language to query actors, roll dice, generate content, and manage game worlds.23929MIT
- AlicenseAqualityCmaintenanceMCP server that exposes RESTForge capabilities to AI agents, enabling them to set up, configure, generate code, and manage RESTForge projects through natural language.2944MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PhillypHenning/foundry-rest-api-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server