Spaces:
Running
Running
| from __future__ import annotations | |
| from typing import Any | |
| from mcp.server.fastmcp import FastMCP | |
| from app.mcp.registry import MCPRegistry | |
| def register_resources(server: FastMCP[Any], registry: MCPRegistry) -> None: | |
| """Register structured media capability and runtime resources.""" | |
| async def media_operations() -> dict[str, Any]: | |
| """Return registered media operations.""" | |
| return await registry.safe_resource("operations", registry.supported_operations_data) | |
| async def media_formats() -> dict[str, Any]: | |
| """Return supported formats.""" | |
| return await registry.safe_resource("formats", registry.supported_formats_data) | |
| async def media_codecs() -> dict[str, Any]: | |
| """Return installed FFmpeg codecs.""" | |
| return await registry.safe_resource("codecs", registry.codecs_data) | |
| async def media_health() -> dict[str, Any]: | |
| """Return dependency health.""" | |
| return await registry.safe_resource("health", registry.health_data) | |
| async def media_configuration() -> dict[str, Any]: | |
| """Return safe configuration values.""" | |
| return await registry.safe_resource("configuration", registry.configuration_data) | |
| async def media_version() -> dict[str, Any]: | |
| """Return version information.""" | |
| return await registry.safe_resource("version", registry.version_data) | |