Skip to main content
Glama
philogicae

rqbit Torrent Client MCP

list_torrents

View all torrents in the rqbit torrent client to monitor downloads and manage transfers.

Instructions

List all torrents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_torrents' MCP tool. It invokes the RqbitClient's list_torrents method, handles errors, and returns the result as a JSON string.
    @mcp.tool() async def list_torrents() -> str: """List all torrents.""" logger.info("Listing all torrents") result = await rqbit_client.list_torrents() if isinstance(result, str): logger.error(f"Error listing torrents: {result}") return f"Error listing torrents: {result}" return dumps(result)
  • Helper method in the RqbitClient wrapper that sends a GET request to '/torrents' endpoint to retrieve the list of torrents.
    async def list_torrents(self) -> list[dict[str, Any]] | str: """list all torrents.""" return await self._safe_request("GET", "/torrents") # type: ignore
  • The @mcp.tool() decorator registers the list_torrents function as an MCP tool.
    @mcp.tool()

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/philogicae/rqbit-mcp'

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