MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_create_mcp_tools

Function test_create_mcp_tools

core/src/mcp/tools.rs:127–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125
126 #[test]
127 fn test_create_mcp_tools() {
128 let manager = Arc::new(McpManager::new());
129 let tools = vec![
130 McpTool {
131 name: "tool1".to_string(),
132 description: Some("Tool 1".to_string()),
133 input_schema: serde_json::json!({}),
134 },
135 McpTool {
136 name: "tool2".to_string(),
137 description: Some("Tool 2".to_string()),
138 input_schema: serde_json::json!({}),
139 },
140 ];
141
142 let wrappers = create_mcp_tools("test", tools, manager);
143
144 assert_eq!(wrappers.len(), 2);
145 assert_eq!(wrappers[0].name(), "mcp__test__tool1");
146 assert_eq!(wrappers[1].name(), "mcp__test__tool2");
147 }
148}

Callers

nothing calls this directly

Calls 1

create_mcp_toolsFunction · 0.85

Tested by

no test coverage detected