Skip to main content
Glama

Describe XML schema

describe_schema
Read-only

Retrieve valid XML elements, attributes, types, and enums from Mount & Blade II: Bannerlord schemas and official data before writing game XML.

Instructions

Explains which elements/attributes are valid, from the game's own XSD files (XmlSchemas folder) plus real values observed in official data. Use before writing XML. No args: list XmlName ids. xml_id only: root and object elements. element (+path for nested ones, e.g. element=Weapon path=Item/ItemComponent/Weapon): attributes with types/enums and children.

Input Schema

NameRequiredDescriptionDefault
pathNoOptional path suffix to disambiguate nested elements, e.g. Item/ItemComponent/Weapon.
xml_idNoXmlName id, e.g. Items, NPCCharacters, SPCultures, Factions, Kingdoms, Settlements, partyTemplates, CraftingPieces, Heroes, GameText.
elementNoElement name, e.g. Item, CraftedItem, NPCCharacter, Culture, Settlement, Weapon, equipment.
observedNoAlso show attribute values seen in official data (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false). The description adds valuable provenance context beyond that: data comes from XSD files plus real values observed in official data, which tells the agent how authoritative the results are.

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

Conciseness4/5

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

Front-loaded with the purpose, then efficiently maps each argument mode in terse fragments. It is compact and each sentence carries weight, though the signature-style fragments are slightly harder to parse than prose.

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?

With no output schema, the description carries the burden of explaining returns, and it does so for each invocation mode. For a read-only introspection tool this is complete enough for an agent to call it correctly.

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?

Schema coverage is already 100%, yet the description still adds behavior mapping the schema alone cannot convey: no args lists XmlName ids, xml_id only returns root/object elements, element (+path) returns attributes with types/enums and children. This binds parameter combinations to concrete output behavior.

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?

States a specific verb and resource: it explains which elements/attributes are valid, sourced from the game's XSD files plus observed official data. This distinguishes it from sibling validators and writers (e.g., validate_module, write_object) by framing it as a pre-write inspection tool.

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 says 'Use before writing XML', which gives a clear when-to-use context. It further documents three usage modes keyed to which params are supplied, though it never names alternative siblings to prefer over this one.

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