MCPcopy
hub / github.com/opensquilla/opensquilla / profile_allowlist

Function profile_allowlist

src/opensquilla/tools/policy_config.py:191–200  ·  view source on GitHub ↗
(profile: str | None, available_tools: frozenset[str])

Source from the content-addressed store, hash-verified

189
190
191def profile_allowlist(profile: str | None, available_tools: frozenset[str]) -> set[str] | None:
192 if not profile:
193 return None
194 key = profile.strip().lower()
195 if key not in _TOOL_PROFILES:
196 raise ValueError(f"unknown tool profile: {profile}")
197 expanded = _TOOL_PROFILES[key]
198 if expanded is None:
199 return None
200 return set(expanded & available_tools)
201
202
203def add_allowed(

Calls 1

setFunction · 0.50