Skip to main content
Glama

page_upsert

Create or update a journal page in Foundry VTT with HTML content, category, indentation level, and public visibility settings. Supports reordering pages by specifying a 0-based index within the category.

Instructions

Create or update a journal page. Idempotent.

content is HTML. level controls sidebar indentation (1=top, 2=indented under the preceding level-1 page). category must already exist — call category_upsert first. public=True sets OBSERVER ownership so players can see this page.

index: 0-based position within the category. When set, all pages in the category are reindexed with clean sort values so the page lands at that position. Omit to leave sort order unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo
levelNo
titleYes
publicNo
contentYes
journalYes
categoryNo
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses idempotency, side effect of reindexing when index is set, ownership change with public=True, and level semantics. Could better clarify how updates are identified (e.g., by title within journal/category), but overall transparent.

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?

Compact paragraph with no fluff. Each sentence conveys essential information. Front-loads purpose. Could use bullet points for readability but remains highly efficient.

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

Completeness4/5

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

Covers most behavioral aspects: idempotency, preconditions, side effects, ownership, ordering. Without annotations or output schema, it still lacks return value specification and error handling. Slight gap in update identification mechanism, but overall adequate for a well-parameterized CRUD 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 has 7 parameters with 0% description coverage. The description adds meaning for content (HTML), level (sidebar indentation with values), category (must pre-exist), public (ownership), and index (0-based, triggers reindex). However, it does not explain the journal parameter, which is required and not self-evident. Title is also unexplained but more intuitive.

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?

Clearly states it creates or updates a journal page and is idempotent. The verb-resource pair is specific and distinct from sibling tools like page_delete, page_list, and page_reorder, which handle different operations.

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

Usage Guidelines4/5

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

Explicitly mentions prerequisite: category must already exist, with a call to use category_upsert first. Also provides guidance on when to set vs omit the index parameter. Lacks explicit negative guidance (when not to use) but context is clear.

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/allardhoeve/foundry-cli'

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