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

Function install_registers_script_tool_visibly

core/src/serve/tools.rs:83–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81
82 #[tokio::test]
83 async fn install_registers_script_tool_visibly() {
84 let agent = Agent::from_config(test_config()).await.unwrap();
85 let session = agent.session("/tmp/ws", None).unwrap();
86
87 install_agent_dir_tools(&session, &[script_spec("repo-search", "search the repo")])
88 .await
89 .unwrap();
90
91 let registry = session.tool_executor().registry();
92 assert!(
93 registry.contains("repo-search"),
94 "script tool is registered"
95 );
96 let tool = registry.get("repo-search").unwrap();
97 assert_eq!(tool.description(), "search the repo", "it's our tool");
98 }
99
100 #[tokio::test]
101 async fn install_mcp_with_bad_command_fails_at_startup() {

Callers

nothing calls this directly

Calls 7

install_agent_dir_toolsFunction · 0.85
script_specFunction · 0.85
registryMethod · 0.80
tool_executorMethod · 0.80
test_configFunction · 0.70
sessionMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected