Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • 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()
  • 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."
            ),
        }
  • 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",
        ]
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It correctly indicates a read-only list operation, but does not mention potential length or authorization needs. Given the simplicity of the tool, this is adequate but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, well-structured sentence conveys all essential information without any wasteful words. It is concise and front-loaded with the action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no parameters and an output schema (not shown). The description clearly states what the tool does (list all presets grouped by tier). This is complete for such a simple tool, as no additional return value details are needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, so schema coverage is 100%. The description adds no parameter information, but none is needed. Baseline is 3 for high coverage, but the absence of parameters justifies a slightly higher score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'every pyobfus preset', and specifies grouping by tier, making the tool's function unambiguous and distinguishing it from siblings like 'check_obfuscation_risks' or 'explain_preset'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The tool's purpose is self-explanatory for listing presets, and the sibling tools have distinct functions, so no explicit when-to-use or alternatives are needed. However, the description does not explicitly advise against using it in other contexts, leaving a minor gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhurong2020/pyobfus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server