Skip to main content
Glama
Terranslayer

D&D 5e Tool Server

by Terranslayer

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENAI_EMBEDDING_API_KEYNoAPI key for semantic search. Required only if using the optional search feature.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
roll_diceA

掷骰。notation 如 '2d6+3'。advantage/disadvantage 仅对单个 d20 有效。 返回统一结构:notation, rolls, natural, modifier, advantage, disadvantage, crit, total。 natural 仅在单颗骰时为该骰点数,多颗骰时为 None。

resolve_checkB

解析属性/技能/豁免检定(d20 + 调整值 vs DC)。检定时 nat20/nat1 不自动成败。

resolve_attackB

解析攻击骰。nat20 必中且暴击,nat1 必失。

roll_damageA

掷伤害。暴击只翻倍骰子数、调整值只加一次。

cr_to_xpA

挑战等级转经验值(接受 '1/4'、'5' 等)。

encounter_budgetA

按队伍各角色等级求某难度的 XP 预算(2014)。

evaluate_encounterB

评估遭遇难度(2014:含遭遇乘数 + 队伍人数偏移)。monsters: [{'cr'|'xp', 'count'}]。

spell_save_dcA

法术豁免 DC = 8 + 熟练 + 属性调整。

spell_attack_bonusA

法术攻击加值 = 熟练 + 属性调整。

lookup_monsterB

按名字(中/英)或 slug 查 SRD 怪物,返回数据 + 中文名 + 来源引用。

lookup_spellA

按名字(中/英)或 slug 查 SRD 法术,返回数据 + 中文名 + 来源引用。

lookup_conditionA

按名字(中/英)或 slug 查 SRD 状态,返回数据 + 中文名 + 来源引用。

lookup_ruleA

关键词检索 SRD 规则条目;查不到则明确返回 found=false,绝不编造。

translate_termC

中英术语映射(en2zh / zh2en)。

monsters_by_crA

列出某 CR(或 CR 区间 min..max)的 SRD 怪物,供按遭遇预算选合法怪物。 接受 '1/4'、'5' 等。返回 {count, monsters:[{index,name_en,name_zh,cr}], citation}。

semantic_searchA

对 SRD 叙事 + 已索引模组散文做语义检索,返回带出处的片段。 campaign/ruleset 为空=不限(含共享规则);给定 campaign 时只召回该战役+共享规则,避免串味。 精确数值仍用 lookup_* 工具。需已建索引(scripts/build_index.py / index_module)。

index_moduleA

把一段模组散文切块嵌入并追加进向量库(带 campaign/source/license/note_id 元数据), 使其可经 semantic_search 按战役召回。需已配置 OpenAI key。返回 {count}。

validate_module_graphA

确定性校验某战役模组依赖图:孤立场景(unreachable_scene)/无来源线索(clue_without_source)/ 悬空链接(dangling_link)。返回 {campaign, counts, issues}。

create_noteA

创建一条 vault 笔记(YAML frontmatter + 正文)。note_type 见 NOTE_TYPES (npc/location/faction/monster/character/encounter/quest/session/campaign_state/ campaign/scene/clue/map);campaign-scoped 类型需传 campaign。自动写入 id/type/name。 overwrite=True 时覆盖同名笔记(用于模组解析等可续/幂等重跑)。

read_noteA

读取 vault 笔记,返回 {path, frontmatter, body}。

list_notesA

列出 vault 笔记(可按 note_type / campaign 过滤),返回 {notes:[{path,name,type}]}。

load_styleA

加载某战役的风格档案(系统提示片段/语气样例/禁忌);缺失则返回中性缺省。 备团/解析/带团前调用,使产出贴合该团语气。返回 {campaign, found, frontmatter, body}。

start_encounterA

开一场运行态遭遇(落在 variants//,不动模板)。combatants 每项含 name/side/initiative/ac/hp{value,max,temp?};自动补 id、按先攻降序、round=1/turn_index=0。

apply_hp_changeA

改某 combatant 的 HP(delta<0 伤害:临时HP先抵、夹到0;delta>0 治疗:不超 max)。 到 0 标 status=down。返回新 hp + status。

manage_combat_stateA

推先攻游标(advance_turn:越界则 round+1、归零)/ 给 combatant 设清 conditions / 设 spell_slots。 返回 {round, turn_index, active_combatant, changed}。

update_campaign_stateA

合并 patch 进运行态 state.md(current/clocks/quests/world_flags 等);首次自动建。 world_flags 增量合并(不清旧旗标),其它 key 整体替换。返回合并后状态。

load_play_contextA

开局/续团一次性载入某战役实例:当前状态(state.md)、风格档案、活动遭遇概要。 返回 {campaign, variant, state, style, active_encounters}。solo-dm 带团入口。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 27 tools

Disambiguation4/5

Most tools target distinct resources or actions: lookups, dice resolution, combat state, notes, and semantic search. A few potential overlaps exist (roll_dice vs resolve_attack/check, manage_combat_state vs apply_hp_change), but the descriptions provide enough clarification.

Naming Consistency4/5

The dominant pattern is snake_case verb_noun (lookup_monster, create_note, resolve_attack, start_encounter), which is predictable. A few exceptions like spell_save_dc and cr_to_xp break the pattern slightly, but overall naming remains readable and consistent.

Tool Count2/5

27 tools exceeds the 25-tool threshold and feels heavy for a single server. Several simple formula helpers like spell_save_dc, spell_attack_bonus, and cr_to_xp could reasonably be consolidated without losing capability.

Completeness3/5

The server covers many areas well: SRD lookups, combat resolution, encounter budgeting, campaign state, notes, and semantic indexing. However, there are visible gaps: no note delete operation, no explicit encounter end or combatant removal, and no spell listing/search beyond exact-name lookup.

Maintenance

ActivityMaintained
ResponsivenessNo issues