mod semantic_validation;
mod snapshot_runner;
use crate::tools::Tools;
use mcplease::traits::AsToolsList;
use snapshot_runner::SnapshotRunner;
use std::env;
#[test]
fn run_snapshot_tests() {
let update_mode = env::var("UPDATE_SNAPSHOTS").is_ok() || env::var("UPDATE_SNAPSHOT").is_ok();
let test_filter = env::var("TEST_FILTER").ok();
let mut runner =
SnapshotRunner::new(update_mode, test_filter).expect("Failed to create snapshot runner");
let results = runner
.run_all_tests()
.expect("Failed to run snapshot tests");
runner.print_summary(&results);
// In verify mode, fail if any tests failed
if !update_mode {
let failed_count = results
.iter()
.filter(|r| !r.response_matches || !r.output_matches)
.count();
if failed_count > 0 {
panic!("❌ {failed_count} snapshot test(s) failed");
}
}
}
#[test]
fn tools_doesnt_panic() {
Tools::tools_list();
}
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jbr/semantic-edit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server