list_presets
Browse obfuscation presets grouped by tier—community, framework-aware, and Pro—to choose the right configuration.
Instructions
List every pyobfus preset available, grouped by tier (community / framework-aware / Pro).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- pyobfus_mcp/pyobfus_mcp/server.py:101-109 (registration)MCP tool registration for 'list_presets' using @app.tool decorator. The _list function delegates to tools.list_presets().
@app.tool( name="list_presets", description=( "List every pyobfus preset available, grouped by tier " "(community / framework-aware / Pro)." ), ) def _list() -> Dict[str, Any]: return list_presets() - pyobfus_mcp/pyobfus_mcp/tools.py:155-181 (handler)Handler function list_presets() that fetches all presets from ObfuscationConfig, classifies them into community/framework/Pro tiers, and returns a Dict with status, community, framework, pro, and ai_hint.
def list_presets() -> Dict[str, Any]: """List every pyobfus preset available, grouped by tier. Returns: Dict with keys: status, community, framework, pro, ai_hint. """ try: from pyobfus.config import ObfuscationConfig except ImportError as e: return _error("PyobfusNotInstalled", str(e), "pip install pyobfus") framework = sorted(ObfuscationConfig.FRAMEWORK_PRESETS) all_presets = ObfuscationConfig.list_presets() pro = {"trial", "commercial", "library", "maximum"} community = [p for p in all_presets if p not in framework and p not in pro] return { "status": "success", "community": community, "framework": framework, "pro": sorted(pro), "ai_hint": ( "Framework presets are free and the recommended starting point " "when your project imports fastapi/django/flask/pydantic/click/" "sqlalchemy. Fall back to 'balanced' otherwise." ), } - pyobfus/config.py:628-652 (helper)ObfuscationConfig.list_presets() classmethod that returns a hardcoded list of all preset names (safe, balanced, aggressive, fastapi, django, flask, pydantic, click, sqlalchemy, trial, commercial, library, maximum).
def list_presets(cls) -> list: """ List all available preset names. Returns: List of preset names """ return [ # Community "safe", "balanced", "aggressive", # Framework-aware "fastapi", "django", "flask", "pydantic", "click", "sqlalchemy", # Pro "trial", "commercial", "library", "maximum", ]