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

Function mcp_options

crates/openshell-policy/src/lib.rs:559–566  ·  view source on GitHub ↗
(mcp: &Option<McpConfigDef>)

Source from the content-addressed store, hash-verified

557}
558
559fn mcp_options(mcp: &Option<McpConfigDef>) -> Option<McpOptions> {
560 let strict_tool_names = mcp_strict_tool_names(mcp);
561 let allow_all_known_mcp_methods = mcp_allow_all_known_mcp_methods(mcp);
562 (strict_tool_names.is_some() || allow_all_known_mcp_methods.is_some()).then_some(McpOptions {
563 strict_tool_names,
564 allow_all_known_mcp_methods,
565 })
566}
567
568fn is_mcp_protocol(protocol: &str) -> bool {
569 protocol.eq_ignore_ascii_case("mcp")

Callers 1

to_protoFunction · 0.85

Calls 2

mcp_strict_tool_namesFunction · 0.85

Tested by

no test coverage detected