MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / split_tool_param

Function split_tool_param

crates/openshell-policy/src/lib.rs:572–585  ·  view source on GitHub ↗
(
    protocol: &str,
    params: BTreeMap<String, QueryMatcherDef>,
)

Source from the content-addressed store, hash-verified

570}
571
572fn split_tool_param(
573 protocol: &str,
574 params: BTreeMap<String, QueryMatcherDef>,
575) -> (Option<QueryMatcherDef>, BTreeMap<String, QueryMatcherDef>) {
576 // Only MCP has the tool-name convention. Non-MCP protocols preserve proto
577 // params on round-trip without inventing MCP semantics.
578 if !is_mcp_protocol(protocol) {
579 return (None, params);
580 }
581
582 let mut params = params;
583 let tool = params.remove("name");
584 (tool, params)
585}
586
587fn allow_proto_to_def(
588 protocol: &str,

Callers 2

allow_proto_to_defFunction · 0.85
deny_proto_to_defFunction · 0.85

Calls 2

is_mcp_protocolFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected