Skip to main content
Glama
rjenks
by rjenks

build_render_character_sheet

Generate a standalone HTML character sheet for Pathfinder 2e with all rules text, spells, features, and equipment, returning a summary.

Instructions

Write a print-ready, fully self-contained HTML character sheet and return a summary of what went onto it.

The rendered file has no external dependencies of any kind -- fonts are
inlined as base64 WOFF2, all ornament is generated inline SVG, and there
is no stylesheet, script, or image fetched at view time -- so it can be
sent to a player as a single attachment and printed unchanged. Open it and
use the browser's own Print dialog (enable background graphics).

The HTML is written to `output_path` and deliberately not returned: a
real sheet runs to 150 KB or more, which would swamp a tool response.

Sections rendered, each only when the character data supports it:
core statistics (attributes, skills, AC and shield, saves, HP,
Perception, strikes, spell DC, conditions tracker); one spellcasting
page per entry in `spellCasters`, with every spell's complete rules text
and traits; features, led by a deity block where there is one (see below)
and then ancestry, heritage, background, level-appropriate auto-granted
class features, any detected subclass, and every feat; equipment with item
rules text; a notes page showing how each number was derived; and a licence
attribution page listing only the sourcebooks actually quoted.

The deity block distinguishes three cases, reported as `deity.status`:

* `none` -- the character follows no deity, including when the export
  writes its own placeholder ("Not set", an empty string, a dash). No
  block is rendered.
* `resolved` -- the recorded name matched the rules data. Renders every
  mechanical field the game defines (divine font, sanctification, skill,
  favored weapon, primary and alternate domains, divine attribute, and the
  deity's cleric spells resolved to names by rank) followed by its full
  descriptive text: title, areas of concern, edicts, anathema, iconography.
  Pantheons, covenants and philosophies resolve here too, labelled as such.
* `unrecognized` -- a name is recorded but isn't in the database, i.e. a
  home-game or non-standard pantheon. Renders a labelled block with ruled
  lines for the standard fields to be filled in by hand. This is *not*
  treated as a defect in the character data and is deliberately kept out
  of `unresolved`.

Everything is derived from `character` plus this project's ingested rules
data -- there is no authored commentary, so a sheet is exactly as complete
as the character export it came from. Two things follow from that worth
knowing before you call it:

* A character with no `spellCasters` block gets no spell pages, even if
  the class is a caster. Pathbuilder exports populate it; hand-written
  character JSON often doesn't.
* Class features come from the ingested `class_progression.granted_items`
  filtered to the character's level, because exports record only choices.
  A subclass (cleric doctrine, druid order) is recovered by matching the
  class's tagged option names against the character's free-text
  `specials`, which is best-effort -- check `subclass` in the result.

`paper` accepts 'letter' (default) or 'a4'; it sets the @page size, and
content reflows rather than being scaled.

`logo_path` embeds an image top-left on page 1 in place of the sheet's own
spiral mark -- intended for the Pathfinder logo from Paizo's Community Use
Package, which the Community Use FAQ permits on free fan material. Accepts
PNG, SVG, JPEG, GIF or WebP (not EPS or AI, which browsers can't display).
The bytes are embedded verbatim and scaled by height with automatic width,
so the logo is never recoloured, cropped or distorted -- the policy forbids
altering a logo's colour, typography, design or proportions, and permits
proportional resizing. Section headings keep the spiral, so the sheet still
has a mark of its own. Omit to use the spiral everywhere.

`symbol_dir` points at a directory of deity symbol images named after the
deity ("Pharasma.png"), such as Paizo's Community Use "Pathfinder Religious
Symbols" pack -- underscores in place of spaces are matched too, so
"Sun_Wukong.png" resolves. When the character's deity resolves and a
matching file exists, the symbol is embedded beside the deity block's stat
table, again scaled by height only. A missing symbol is not an error: the
block simply renders without one.

Returns a dict with the output `path` and `bytes`, the `sections` written,
counts of what was rendered, the detected `subclass`, the sourcebooks
quoted under each licence, and -- importantly -- `unresolved` names and
`warnings`. An item the export calls "Repair Kit" where the rules data has
"Repair Toolkit" is reported there rather than guessed at or dropped
silently, so treat a non-empty `unresolved` as something to fix in the
character data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paperNoletter
characterYes
logo_pathNo
symbol_dirNo
output_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, but the description thoroughly discloses behavior: output is written to disk and not returned, fonts are inlined, deity statuses have three distinct cases, unresolved items are reported, and logo embedding follows licensing constraints. This is exemplary transparency.

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?

Although long, every paragraph earns its place by covering a distinct aspect: output format, section list, deity handling, parameter details, and return value. The structure is front-loaded with the core purpose and flows logically, making it easy to navigate despite the length.

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

Completeness5/5

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

Given the tool's complexity and the absence of annotations, the description is exceptionally complete. It covers behavior, edge cases, parameter semantics, and the return dict, leaving little room for misinterpretation. It even explains why certain data might be missing and how to interpret warnings.

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

Parameters5/5

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

The input schema has zero parameter descriptions, yet the description explains every parameter in depth: character, output_path, paper (letter/a4 defaults), logo_path (accepted formats, scaling behavior), and symbol_dir (matching rules). It fully compensates for the schema's lack of guidance.

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 first sentence clearly states the tool's purpose: to write a print-ready, self-contained HTML character sheet and return a summary. This specific verb+resource formulation distinguishes it from sibling tools like build_to_pathbuilder_export or build_validate_build.

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?

The description provides rich context on when to use the tool (e.g., sending a printable sheet to a player) and highlights important caveats before calling (e.g., lack of spellCasters means no spell pages). It does not explicitly name alternative tools, but the use-case is clear enough.

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/rjenks/pf2e-mcp'

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