[{'Text': '"""MCP prompts module with auto-discovery and registration.\n\nProvides reusable message templates and workflows for MCP clients.\nAutomatically discovers and registers prompt functions.\n"""\n\nimport importlib\nimport pkgutil\nimport inspect\nfrom pathlib import Path\n\n\ndef register_prompts(mcp):\n    """Register all MCP prompts by auto-discovering functions in prompt modules.\n\n    Automatically finds all Python modules in the prompts directory and registers\n    every public function (not starting with _) as an MCP prompt.\n\n    Just create a .py file with prompt functions - no wrapper functions or decorators needed!\n\n    Args:\n        mcp: FastMCP instance to register prompts with\n    """\n    # Get the prompts package directory\n    prompts_dir = Path(__file__).parent\n\n    # Discover all Python modules in this directory\n    for module_info in pkgutil.iter_modules([str(prompts_dir)]):\n        # Skip __init__ and any private modules\n        if module_info.name.startswith("_"):\n            continue\n\n        try:\n            # Import the module\n            module = importlib.import_module(\n                f".{module_info.name}", package="point_topic_mcp.prompts"\n            )\n\n            # Find all functions defined in this module (not imported from elsewhere)\n            prompt_count = 0\n            for name, obj in inspect.getmembers(module, inspect.isfunction):\n                # Skip private functions\n                if name.startswith("_"):\n                    continue\n\n                # Only register functions actually defined in this module (not imported)\n                if obj.__module__ == module.__name__:\n                    mcp.prompt()(obj)\n                    prompt_count += 1\n\n            if prompt_count > 0:\n                print(\n                    f"[MCP] Registered {prompt_count} prompts from {module_info.name}"\n                )\n\n        except Exception as e:\n            print(f"[MCP] Warning: Failed to load prompts from {module_info.name}: {e}")\n            import traceback\n\n            traceback.print_exc()\n            # Continue with other modules even if one fails\n\n\n__all__ = ["register_prompts"]\n'}]