Skip to main content

soma_mcp_server/
lib.rs

1// Render per-item feature-requirement badges when rustdoc runs on nightly with
2// `--cfg docsrs` (docs.rs posture; locally via `cargo xtask doc --docsrs-cfg`).
3// Inert under the stable CI doc gate: stable rustdoc never sets `docsrs`.
4#![cfg_attr(docsrs, feature(doc_auto_cfg))]
5//! Reusable inbound MCP server helpers.
6
7pub mod conformance;
8pub mod error_result;
9#[cfg(feature = "http")]
10pub mod http;
11pub mod protocol;
12pub mod response_paging;
13pub mod trace;
14
15pub use response_paging::ResponsePageStore;
16
17/// Crate version from Cargo metadata.
18pub const VERSION: &str = env!("CARGO_PKG_VERSION");
19
20#[cfg(test)]
21pub(crate) fn assert_result_has_no_meta(result: &rmcp::model::CallToolResult) {
22    assert!(result.meta.is_none(), "result meta should stay empty");
23    let serialized = serde_json::to_value(result).expect("result should serialize");
24    assert!(
25        serialized.get("_meta").is_none(),
26        "serialized result included _meta: {serialized}"
27    );
28}
29
30#[cfg(test)]
31#[path = "lib_tests.rs"]
32mod tests;