//! CottonDB's tool surface — 228 MCP tools, 187 of them assistant-facing, as a//! library every surface links.//!//! Step 4 of the Rust core, decision P3. The handlers used to live inside//! `cotton-server`, which was fine while the server was their only caller. It//! stopped being fine the moment the PHONE started authoring through them: a//! phone that linked the server would link axum, hyper, `reqwest`'s http2 stack//! and mupdf's vendored C tree to write a todo.//!//! So the tools are here, and this crate depends on `cotton-store` and//! `cotton-core` and NOTHING ELSE. That is a load-bearing rule, not a//! preference — `no-server-deps.rs` in `__tests__` asserts it, and//! `cargo tree -p cotton-tools -e normal` is the proof a reader can run.//!//! WHAT LIVES HERE: the handler groups (`mcp::handlers`), the dispatch table//! (`mcp::dispatch`, which also owns [`mcp::dispatch::Ctx`], `ToolServices`//! and the rails), the writer, the read layer, the protocol shapes, the verb//! grid gate, the language sweep, the prompts, and the generated catalogue.//! With them come the four things a handler cannot run without and that are//! not the server's: the injected clock, the injected randomness, the fold//! chokepoint the writer commits through, and the small domain modules the//! handlers read (`sharing::expiry`, `messages::sink`,//! `embed::state`).//!//! WHAT DOES NOT: the HTTP transport (`cotton_server::mcp::server`), the token//! store and OAuth binding, the audit row writer, and every rail's//! IMPLEMENTATION. A rail is declared here as a trait and filled in by whoever//! is running — the server fills them all, a worker fills none//! ([`mcp::dispatch::ToolServices::none`]), and the phone fills the two it can.//!//! `cotton_server::mcp` re-exports every module of this crate's `mcp`, so a//! reader who knows the old paths still finds them where they were.// Every refusal a tool makes is a sentence, and the errors that carry one are// wide for the same reason `cotton-server`'s are: the sentence IS the contract.#![allow(clippy::result_large_err)]#[cfg(feature = "test-fixtures")]pubmod test_fixtures;pubmod clock;// What Cotton keeps reading from outside: the pure half of the MCP bridge// (decision note 7767ed9c) — judging a server, reading a mapping, the Domains// tool as data. The fetching half is the server's.pubmod connections;pubmod definitions;pubmod kit;pubmod kit_keep;pubmod presentation;pubmod activity;pubmod derive;pubmod money_run;pubmod dictation;/// The device row in the person's own database — who may open this file.pubmod devices;pubmod embed;pubmod feedback;pubmod mcp;pubmod messages;pubmod rails;pubmod random;pubmod relay_name;pubmod session_birth;pubmod session_words;pubmod session_echo;pubmod sharing;pubmod sync;#[cfg(feature = "test-fixtures")]pubmod synthetic;pubmod todo_labels;pubmod toolkits;pubmod tool_pictures;pubmod founding;pubmod home_arrangement;pubmod tool_figures;pubmod household_address;pubmod imports;/// Where each contact came from (`person_source`, PEOPLE BUILD 1): every import and sync matches by source first.pubmod people_sources;pubmod tool_export;