"""Tool registry: the five groups, registered in one call. The groups mirror the domain rather than the HTTP routes — papers and paragraphs and sentences are the same tables the REST API serves, but a model reaches for "append a sentence" and "write a whole paper" as different jobs, and the split between :mod:`~app.mcp.tools.papers` and :mod:`~app.mcp.tools.paragraphs` follows those jobs. Prefixes are load-bearing: every tool name starts with its group (``paper_``, ``paragraph_``, ``sentence_``, ``template_``, ``field_``), because that prefix is what a model uses to pick a tool out of a list of twenty-nine without reading all twenty-nine descriptions. """ from __future__ import annotations from mcp.server.mcpserver import MCPServer from app.mcp.tools import fields, papers, paragraphs, sentences, templates #: Registration order is also the order a client lists the tools in, which is #: the order a paper is actually written in: find it, shape it, write it, then #: the things it is written against. MODULES = (papers, paragraphs, sentences, templates, fields) def register_all(server: MCPServer) -> None: """Register every paper-doc tool on ``server``.""" for module in MODULES: module.register(server) __all__ = ["MODULES", "register_all"]