McpResearchTools.h header

#include <ew/app/McpResearchTools.h>

Namespace ew::app

Functions

void ew::app::registerMcpResearchTools(McpServer &server, Workspace &workspace, McpChangeLog &log)

Registers the research / planning / TTRPG / export / import tool family on server (docs/MCP_SERVER.md §3 "D6"): sources and citations (list_sources, add_source, cite), planning (list_tasks, update_task, list_plot_threads, update_plot_thread, get_beat_sheet), conlangs (get_language, add_lexicon_words, translate), tabletop tools (get_statblock, create_statblock, roll, assess_encounter), analytics (get_analytics), the book/website/codex exports (export_manuscript, export_website, export_codex), the §4.14 importer suite (import_file), and content packs (apply_content_pack, save_content_pack).

Every mutating tool runs through runMcpMutation – one undo group, saved immediately, logged to log – and validates its arguments fully before pushing any command. Objects are addressed by name/title (entities also by alias), case-insensitively; a name matching several objects fails honestly listing the choices. An object marked "Exclude from AI" is invisible to the read tools and refused by the write tools (the act-mode contract). Tool text is English and deliberately not tr()-wrapped: it is read by the connected AI client, not shown in the app's UI. workspace and log must outlive server.