Skip to content

Commit 7538b25

Browse files
Mnehmosclaude
andcommitted
docs(tools): update math_manage and combat_action descriptions
- math_manage: Add combat redirect warning at top, specify it's for non-combat dice rolls only (skill checks, stat gen, loot tables) - combat_action: Emphasize self-contained nature - rolls dice, calculates stats, applies damage, syncs HP all in one call - Both tools now clearly direct GM to use combat_action for combat Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1ee78cf commit 7538b25

File tree

4 files changed

+32
-13
lines changed

4 files changed

+32
-13
lines changed

src/server/consolidated/combat-action.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,22 @@ export const CombatActionTool = {
296296
name: 'combat_action',
297297
description: `Execute combat actions during an encounter. Actions: ${ACTIONS.join(', ')}.
298298
299-
⚔️ OFFENSIVE:
300-
- attack - Make an attack roll against a target
301-
- cast_spell - Cast a spell (single target or AoE)
299+
🎯 SELF-CONTAINED - This tool handles EVERYTHING for combat:
300+
- Rolls dice internally (d20 for attacks, damage dice, saves)
301+
- Auto-calculates attack bonus from character stats if not provided
302+
- Auto-calculates damage from character stats if not provided
303+
- Applies damage/healing and syncs HP to character database
304+
- Tracks action economy (action/bonus/reaction)
305+
306+
DO NOT use math_manage for combat rolls - use this tool instead!
307+
308+
⚔️ ATTACK (minimal call):
309+
{ action: "attack", encounterId, actorId, targetId }
310+
Everything else auto-calculated. Returns: roll result, damage dealt, HP change.
311+
312+
🔮 CAST_SPELL (minimal call):
313+
{ action: "cast_spell", encounterId, actorId, spellName, targetId }
314+
Validates spell, rolls damage, applies effects, handles saves - all automatic.
302315
303316
💚 SUPPORT:
304317
- heal - Restore HP to a target
@@ -313,10 +326,7 @@ export const CombatActionTool = {
313326
- dodge - Disadvantage on attacks against you, advantage on DEX saves
314327
- ready - Prepare an action with a trigger
315328
316-
Aliases: hit/strike→attack, cast/spell→cast_spell, sprint→dash, evade→dodge.
317-
318-
Use combat_manage for encounter lifecycle (create, end, advance).
319-
Use combat_map for terrain and visualization.`,
329+
Aliases: hit/strike→attack, cast/spell→cast_spell, sprint→dash, evade→dodge.`,
320330
inputSchema: z.object({
321331
action: z.string().describe(`Action: ${ACTIONS.join(', ')}`),
322332
encounterId: z.string().describe('Encounter ID'),

src/server/consolidated/math-manage.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,19 @@ export const MathManageTool = {
297297
name: 'math_manage',
298298
description: `Mathematical operations for RPG mechanics.
299299
300-
🎲 DICE ROLLING (roll):
300+
⚠️ COMBAT REDIRECT - DO NOT USE FOR:
301+
- Attack rolls → Use combat_action { action: "attack" } instead
302+
- Spell damage → Use combat_action { action: "cast_spell" } instead
303+
- Saving throws in combat → combat_action handles these automatically
304+
The combat_action tool rolls dice, calculates damage, and applies HP changes in one call.
305+
306+
🎲 DICE ROLLING (roll) - For NON-COMBAT situations:
307+
- Skill checks outside combat
308+
- Stat generation (4d6dl1)
309+
- Random tables/loot
310+
- NPC behavior rolls
311+
- Exploration/navigation
312+
301313
Standard notation plus special modifiers:
302314
- 2d6+3: Basic roll with modifier
303315
- 4d6dl1: Drop lowest 1 (stat generation)
@@ -321,11 +333,6 @@ Calculate ranged attack trajectories:
321333
- height: Initial height (ft)
322334
- gravity: Default 32.2 ft/s²
323335
324-
💡 WHEN TO USE:
325-
- Use roll for all dice-based mechanics
326-
- Use probability to analyze player options
327-
- Use projectile for siege weapons, falling objects
328-
329336
Actions: roll, probability, solve, simplify, projectile`,
330337
inputSchema: z.object({
331338
action: z.string().describe(`Action: ${ACTIONS.join(', ')}`),

tmpclaude-2eaa-cwd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/f/Github/mnehmos.rpg.mcp

tmpclaude-c517-cwd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/f/Github/mnehmos.rpg.mcp

0 commit comments

Comments
 (0)