"""
Media download and screenshot tools
"""

from mcp.types import Tool


def get_media_tools():
    """Return tools for media processing and screenshots."""
    return [
        Tool(
            name="download_media",
            description="Automatically download media files from a page",
            inputSchema={
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "URL to download media from"
                    },
                    "types": {
                        "type": "array",
                        "items": {"type": "string"},
                        "description": "Media types to download: 'images', 'videos', 'pdfs', 'documents'",
                        "default": ["images"]
                    },
                    "download_path": {
                        "type": "string",
                        "description": "Local path to save files (default: ./downloads/)",
                        "default": "./downloads/"
                    },
                    "max_files": {
                        "type": "number",
                        "description": "Maximum number of files to download (default: 50)",
                        "default": 50
                    },
                    "min_size": {
                        "type": "number",
                        "description": "Minimum file size in KB (default: 1)",
                        "default": 1
                    },
                    "max_size": {
                        "type": "number",
                        "description": "Maximum file size in MB (default: 100)",
                        "default": 100
                    }
                },
                "required": ["url"]
            }
        ),

        Tool(
            name="debug_screenshot",
            description="Take screenshot for debugging purposes",
            inputSchema={
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "URL to take screenshot of"
                    },
                    "path": {
                        "type": "string",
                        "description": "Path to save screenshot (default: auto-generated)",
                        "default": None
                    },
                    "full_page": {
                        "type": "boolean",
                        "description": "Capture full page screenshot (default: true)",
                        "default": True
                    },
                    "element_selector": {
                        "type": "string",
                        "description": "CSS selector to screenshot specific element"
                    },
                    "wait_for": {
                        "type": "string",
                        "description": "CSS selector to wait for before screenshot"
                    }
                },
                "required": ["url"]
            }
        )
    ]
