list_search_plugins
Display all available torrent search plugins and their current status to enable efficient torrent discovery within qBittorrent.
Instructions
List all available search plugins in qBittorrent.
Returns: List of search plugins with their status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:195-217 (handler)The main handler function for the 'list_search_plugins' tool. It uses the qBittorrent client to fetch available search plugins, formats them into a list of dictionaries with name, version, enabled status, URL, and supported categories, and returns the list. The @mcp.tool() decorator registers it as an MCP tool.@mcp.tool() def list_search_plugins() -> list[dict[str, Any]]: """ List all available search plugins in qBittorrent. Returns: List of search plugins with their status """ client = get_qbt_client() plugins = client.search_plugins() result = [] for plugin in plugins: result.append({ "name": plugin.name, "version": plugin.version, "enabled": plugin.enabled, "url": plugin.url, "supported_categories": plugin.supportedCategories }) return result
- main.py:195-195 (registration)Registration of the 'list_search_plugins' tool using the FastMCP @mcp.tool() decorator.@mcp.tool()
- main.py:17-38 (helper)Helper function to get or initialize the qBittorrent client instance, used by the list_search_plugins tool.def get_qbt_client(): """Get or create qBittorrent client instance.""" global qbt_client if qbt_client is None: host = os.getenv("QBITTORRENT_HOST", "http://localhost:8080") username = os.getenv("QBITTORRENT_USERNAME", "admin") password = os.getenv("QBITTORRENT_PASSWORD", "adminadmin") qbt_client = qbittorrentapi.Client( host=host, username=username, password=password ) try: qbt_client.auth_log_in() except qbittorrentapi.LoginFailed as e: raise Exception(f"Failed to login to qBittorrent: {e}") return qbt_client