Skip to main content
Glama

Preview XSLT patches

xslt_preview
Read-only

Run a Bannerlord module's merge and XSLT pipeline to see before/after diffs for target objects and catch XSLT errors that break loading.

Instructions

Runs the game's merge + XSLT pipeline (System.Xml XslCompiledTransform, like the game) for a module and shows before/after diffs of every object its XSLT rules target (or only targets). Also reveals XSLT errors that would break loading.

Input Schema

NameRequiredDescriptionDefault
moduleYesModule whose XSLT to preview (any module, read-only is fine).
xml_idNoLimit to one XmlName id, e.g. Items.
targetsNoSpecific objects to diff, e.g. Item.x or Culture.empire (default: everything the rules target).
game_typeNoGame type (default Campaign).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuine value beyond that: it runs the real game engine path (System.Xml XslCompiledTransform), claims fidelity to actual game loading, and discloses that XSLT load-breaking errors are surfaced — useful behavioral context not derivable from structured fields.

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?

Two tight sentences, front-loaded with the core action, followed by the secondary benefit (error surfacing). No filler and nothing redundant.

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?

With no output schema, the description does the work of explaining the return shape (before/after diffs per object, plus XSLT errors). Combined with full schema coverage, an agent has enough to call it correctly; only the exact diff/error format is unspecified.

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 100% and each of the 4 parameters is documented in-schema (including the `targets` default). The description's '(or only `targets`)' merely restates the schema default rather than adding format or semantics, so the baseline 3 is appropriate.

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

Purpose4/5

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

The description states a concrete verb+resource: it runs the game's merge + XSLT pipeline for a module and shows before/after diffs per targeted object. The dry-run/preview framing clearly separates it from the sibling xslt_patch, though it never names that sibling explicitly.

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

Usage Guidelines3/5

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

Usage is only implied — the preview/diff framing suggests 'check before patching', and it notes `targets` is optional, but there is no explicit when-to-use vs xslt_patch or validate_module, and no stated exclusions. The schema ('any module, read-only is fine') carries the little guidance that exists.

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