Skip to main content
Glama
zagushka

Foundry REST API MCP

by zagushka

foundry_previous_turn

Revert the current encounter to its previous turn in FoundryVTT. Useful for correcting missteps or revisiting actions during table play.

Instructions

Return to the previous encounter turn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdNoOptional Foundry user ID or username for permission-scoped access.
clientIdNoFoundry client ID; defaults to FOUNDRY_CLIENT_ID.
encounterNo
Behavior3/5

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

The annotation readOnlyHint=false already communicates that this is a mutating operation, and the description aligns with that. However, it does not disclose additional behavioral nuances, such as how it interacts with rounds or what happens at encounter boundaries. No contradiction with annotations.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler words. It efficiently communicates the action without unnecessary detail.

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

Completeness2/5

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

For a state-changing tool with three parameters and no output schema, the description is too sparse. It omits whether an active encounter is required, how the encounter parameter is used, and the behavior at start/end of a turn or round. This leaves significant gaps for an agent selecting or invoking the tool.

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

Parameters3/5

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

Schema description coverage is 67%, with userId and clientId documented but 'encounter' left unexplained. The description adds no parameter semantics, leaving the critical 'encounter' parameter ambiguous. Baseline is acceptable given moderate coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'return' and identifies a clear resource ('previous encounter turn'), distinguishing it from siblings like foundry_next_turn and foundry_previous_round. It unambiguously states the action performed.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites (e.g., whether an encounter must be active) or contrast with next_turn/previous_round. It simply states the function.

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

Install Server

Other Tools

Latest Blog Posts

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/zagushka/foundry-rest-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server