Skip to main content
Glama

Add a D&D 5e feature

dnd5e-add-feature

Add D&D 5e features to a Foundry VTT NPC or character: passives, saves, attacks, auras, spells, or spellcasting. Each type reads only its own parameters and reports ignored ones.

Instructions

[D&D 5e only] Add one thing to an existing dnd5e NPC or character; featureType chooses what, and each kind reads only its own parameters (the answer names the ignored ones).

  • passive: a trait without a roll. Needs featureName.

  • save: a feature forcing a saving throw with fixed DC, damage, optional template. Needs featureName, saveAbility, saveDC, damageParts; areaSize with areaType.

  • attack: a weapon attack. Needs featureName, attackType, damageParts; rangeFt when ranged. The first damage part is the weapon damage.

  • attack-with-save: an attack whose hit also forces a save with its own damage. Needs in addition saveAbility, saveDC, saveDamageParts.

  • aura: area damage without attack or save; no lasting aura or effect is created. Needs featureName, damageParts, areaType, areaSize.

  • spellcasting: casting ability and caster level of an NPC without class items, per class, level and rules version (2024 paladins and rangers have slots at level 1). dnd5e derives the slots; actors with class items are refused. Needs spellcastingClass, spellcastingLevel.

  • spells: copy spells by English name from compendiums. Needs spellNames. An item name the actor already has (ignoring case) is refused. The actor is found by id, exact name or token id, never by part of a name. Everything written is read back. Run spellcasting before spells.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveDCNoFixed difficulty class of the save. Used by: save, attack-with-save.
rangeFtNoNormal range in feet, needed for a ranged attack. Used by: attack, attack-with-save.
reachFtNoReach in feet. Used by: melee attack, attack-with-save.
areaSizeNoSize of the template in areaUnits (length of a line, radius of a sphere). Used by: save with areaType, aura.
areaTypeNoTemplate shape. An emanation is stored as a radius; a line gets a width, a cylinder a height, a cube its side in every direction. Used by: save (optional), aura (required).
equippedNoWhether the weapon is equipped. Used by: attack, attack-with-save.
areaUnitsNoUnits of areaSize. Used by: save, aura.ft
attackTypeNoMelee uses reachFt, ranged needs rangeFt. Used by: attack, attack-with-save.
halfOnSaveNoHalf damage on a successful save; otherwise none. Used by: save.
proficientNoWhether the proficiency bonus is added to hit; false stores a non-proficient weapon. Used by: attack, attack-with-save.
propertiesNodnd5e weapon property keys such as "fin", "lgt", "rch", "thr"; unknown keys are stored with a warning. Used by: attack, attack-with-save.
saveOnSaveNoDamage of that save on a success. Used by: attack-with-save.none
sourceBookNoSource book, e.g. "MM". Used by: passive, save, attack, attack-with-save, aura.
sourcePageNoPage in the source book. Used by: passive, save, attack, attack-with-save, aura.
spellNamesNoEnglish spell names, matched whole and ignoring case. Used by: spells.
affectsTypeNoWhat the area affects. Used by: save, aura.creature
attackBonusNoExtra bonus to hit, not to damage. Used by: attack, attack-with-save.
damagePartsNoDamage. For an attack the first part is the weapon damage and further parts add to it. Used by: save, attack, attack-with-save, aura.
descriptionNoDescription as HTML. Used by: passive, save, attack, attack-with-save, aura.
featureNameNoName of the new item; refused when the actor has an item of that name, ignoring case. Used by: passive, save, attack, attack-with-save, aura.
featureTypeYesWhat to add; each kind reads only its own parameters and names the ones it ignored
longRangeFtNoLong range in feet, greater than rangeFt. Used by: ranged attack, attack-with-save.
saveAbilityNoAbility of the saving throw. Used by: save, attack-with-save.
sourceRulesNoRules version. Decides the slots of paladin and ranger at level 1 and is stored as the source of an item; the world setting of dnd5e when left out. Used by: passive, save, attack, attack-with-save, aura, spellcasting.2014
weaponClassNoWeapon category; "natural" for claws and bites. Used by: attack, attack-with-save.natural
activationTypeNoHow it is used in the action economy. Used by: save, attack, attack-with-save, aura.action
abilityModifierNoAbility for attack and damage. Left out: the better of STR and DEX for a natural weapon or one with the property "fin", as dnd5e allows them, else STR in melee and DEX at range. Written into the attack under both rules versions. Used by: attack, attack-with-save.
actorIdentifierYesThe actor: its id, its exact name (case does not matter) or the id of one of its tokens. Parts of a name are not matched. Needed by every kind
compendiumPacksNoItem compendiums to search, first match wins. Left out: the standard spell compendium of the world's rules version (dnd5e.spells for 2014, dnd5e.spells24 for 2024). Used by: spells.
saveDamagePartsNoDamage of the separate save that follows a hit. Used by: attack-with-save.
spellcastingClassNoClass whose table gives the spell slots; warlock uses pact magic. Used by: spellcasting.
spellcastingLevelNoClass level from 1 to 20. Used by: spellcasting.
spellcastingAbilityNoCasting ability; left out, INT for wizard and artificer, WIS for cleric, druid and ranger, CHA for bard, paladin, sorcerer and warlock. Used by: spellcasting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv14.2609.4

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare not-read-only/not-idempotent/not-destructive; the description adds rich behavior far beyond that: duplicate item names are refused case-insensitively, actor lookup is by id/exact name/token id and never partial, ignored parameters are named in the answer, everything written is read back, actors with class items are refused for spellcasting, auras create no lasting effect, and unknown keys are stored with a warning. 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?

Long but every clause earns its place given 33 parameters and 7 sub-modes. Front-loaded with the scoping sentence and '[D&D 5e only]' tag; the bullets are consistent and scannable (definition + minimum parameters per type); the closing paragraph groups the global rules (refusal, lookup, read-back, ordering) efficiently.

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?

No output schema exists, but 'Everything written is read back' sets return expectations, and the description covers every mode's inputs, rejection conditions, defaults, and edge cases (2024 paladin/ranger slots at level 1, warlock pact magic, natural weapons). For a tool this complex, nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100% with per-parameter 'Used by' descriptions, so the baseline is 3. The description adds cross-parameter structure the flat schema cannot express: minimal required sets per featureType, 'The first damage part is the weapon damage', 'rangeFt when ranged', and default-derivation rules (abilityModifier fallback, compendiumPacks default). That pushes it above the schema-only baseline.

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+resource ('Add one thing to an existing dnd5e NPC or character') and then enumerates seven distinct feature types with concrete definitions (passive, save, attack, attack-with-save, aura, spellcasting, spells). The 'one thing' phrasing and per-type breakdown distinguish it from siblings like dnd5e-add-features-from-compendium and dnd5e-create-npc.

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?

Extensive internal routing guidance: each featureType gets a definition and a minimal required parameter set, plus global rules like 'Run spellcasting before spells' and the actor-lookup constraints. However, there is no explicit when-not-to-use guidance against the near-sibling dnd5e-add-features-from-compendium (bulk addition from compendium), so tool-level alternative routing is left to inference.

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

Deploy Server

Other Tools