Skip to content

Commit 1735de9

Browse files
Mnehmosclaude
andcommitted
docs(tools): enhance skill check and math_manage descriptions
- math_manage: Redirect skill/ability/save checks to specialized tools - roll_skill_check: Document auto-calculation of proficiency, expertise, armor stealth disadvantage - roll_ability_check: Document auto-calculation of ability modifier - roll_saving_throw: Document auto-calculation of save proficiency, note that combat saves are handled by combat_action All three skill check tools now clearly marked as PREFERRED over math_manage. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7538b25 commit 1735de9

File tree

4 files changed

+44
-14
lines changed

4 files changed

+44
-14
lines changed

src/server/consolidated/math-manage.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -297,18 +297,21 @@ export const MathManageTool = {
297297
name: 'math_manage',
298298
description: `Mathematical operations for RPG mechanics.
299299
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
300+
⚠️ REDIRECT - DO NOT USE FOR:
301+
- Attack rolls → Use combat_action { action: "attack" }
302+
- Spell damage → Use combat_action { action: "cast_spell" }
303+
- Skill checks → Use roll_skill_check (auto-applies proficiency)
304+
- Ability checks → Use roll_ability_check (auto-applies modifier)
305+
- Saving throws → Use roll_saving_throw (auto-applies save proficiency)
306+
307+
These specialized tools look up character stats and apply bonuses automatically!
308+
309+
🎲 DICE ROLLING (roll) - Use ONLY for:
308310
- Stat generation (4d6dl1)
309311
- Random tables/loot
310-
- NPC behavior rolls
311-
- Exploration/navigation
312+
- NPC behavior/morale rolls
313+
- Weather/random encounters
314+
- Anything without character stat bonuses
312315
313316
Standard notation plus special modifiers:
314317
- 2d6+3: Basic roll with modifier

src/server/skill-check-tools.ts

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,17 @@ function getAbilityModifier(abilityScore: number): number {
9494
export const SkillCheckTools = {
9595
ROLL_SKILL_CHECK: {
9696
name: 'roll_skill_check',
97-
description: `Roll a skill check using character stats. Automatically applies ability modifier and proficiency bonus if proficient.
98-
Example: roll_skill_check with characterId and skill="perception" for active character's Perception check.`,
97+
description: `Roll a skill check using character stats. PREFERRED over math_manage for skill rolls!
98+
99+
🎯 AUTO-CALCULATES:
100+
- Ability modifier from character stats
101+
- Proficiency bonus if character is proficient
102+
- Expertise (double proficiency) if applicable
103+
- Armor stealth disadvantage (automatically detected)
104+
105+
Skills: perception, stealth, athletics, acrobatics, arcana, history, investigation, nature, religion, animal_handling, insight, medicine, survival, deception, intimidation, performance, persuasion, sleight_of_hand
106+
107+
Example: { characterId: "abc123", skill: "perception", dc: 15 }`,
99108
inputSchema: z.object({
100109
characterId: z.string().describe('ID of the character making the check'),
101110
skill: SkillEnum.describe('Skill to roll (e.g., perception, stealth, athletics)'),
@@ -108,7 +117,14 @@ Example: roll_skill_check with characterId and skill="perception" for active cha
108117

109118
ROLL_ABILITY_CHECK: {
110119
name: 'roll_ability_check',
111-
description: 'Roll a raw ability check (no skill proficiency). Uses only the ability modifier.',
120+
description: `Roll a raw ability check (no skill proficiency). PREFERRED over math_manage!
121+
122+
🎯 AUTO-CALCULATES:
123+
- Ability modifier from character stats
124+
125+
Use for: Initiative, grapple contests, raw strength/dex tests
126+
127+
Example: { characterId: "abc123", ability: "str", dc: 12 }`,
112128
inputSchema: z.object({
113129
characterId: z.string().describe('ID of the character making the check'),
114130
ability: AbilityEnum.describe('Ability score to use (str, dex, con, int, wis, cha)'),
@@ -121,7 +137,16 @@ Example: roll_skill_check with characterId and skill="perception" for active cha
121137

122138
ROLL_SAVING_THROW: {
123139
name: 'roll_saving_throw',
124-
description: 'Roll a saving throw. Applies proficiency bonus if character has save proficiency.',
140+
description: `Roll a saving throw. PREFERRED over math_manage for saves!
141+
142+
🎯 AUTO-CALCULATES:
143+
- Ability modifier from character stats
144+
- Proficiency bonus if character has save proficiency
145+
146+
Use for: Trap saves, environmental hazards, out-of-combat saves.
147+
Note: In-combat spell saves are handled automatically by combat_action cast_spell.
148+
149+
Example: { characterId: "abc123", ability: "dex", dc: 14 }`,
125150
inputSchema: z.object({
126151
characterId: z.string().describe('ID of the character making the save'),
127152
ability: AbilityEnum.describe('Saving throw type (str, dex, con, int, wis, cha)'),

tmpclaude-46d4-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-68e9-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)