1use mcp_tester::ServerTester;
11use std::time::Duration;
12
13pub mod scaffold;
14pub mod schema_export;
15pub mod test_apps;
16pub mod test_check;
17pub mod test_generate;
18
19pub use scaffold::ScaffoldTool;
20pub use schema_export::SchemaExportTool;
21pub use test_apps::TestAppsTool;
22pub use test_check::TestCheckTool;
23pub use test_generate::TestGenerateTool;
24
25pub(crate) const DEFAULT_TIMEOUT_SECS: u64 = 30;
26
27pub(crate) const fn default_timeout() -> u64 {
28 DEFAULT_TIMEOUT_SECS
29}
30
31pub(crate) fn create_tester(url: &str, timeout_secs: u64) -> pmcp::Result<ServerTester> {
32 ServerTester::new(
33 url,
34 Duration::from_secs(timeout_secs),
35 false, None, None, None, )
40 .map_err(internal_err)
41}
42
43pub(crate) fn internal_err(e: impl std::fmt::Display) -> pmcp::Error {
46 pmcp::Error::Internal(e.to_string())
47}