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

Function should_include_mcp_tool

core/src/tools/selector.rs:114–129  ·  view source on GitHub ↗
(
    name: &str,
    name_lower: &str,
    prompt_lower: &str,
    wants_mcp: bool,
)

Source from the content-addressed store, hash-verified

112}
113
114fn should_include_mcp_tool(
115 name: &str,
116 name_lower: &str,
117 prompt_lower: &str,
118 wants_mcp: bool,
119) -> bool {
120 if !name.starts_with("mcp__") {
121 return false;
122 }
123
124 if prompt_mentions_tool(prompt_lower, name_lower) {
125 return true;
126 }
127
128 wants_mcp
129}
130
131fn selection_context(messages: &[Message]) -> String {
132 let mut parts = Vec::new();

Callers 1

select_tools_for_promptFunction · 0.85

Calls 1

prompt_mentions_toolFunction · 0.85

Tested by

no test coverage detected