Skip to main content
Glama
philogicae

rqbit Torrent Client MCP

get_torrent_stats

Retrieve detailed statistics and status information for a torrent using its ID or infohash to monitor progress and performance.

Instructions

Get stats and status for a specific torrent by its ID or infohash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
torrent_idYes

Implementation Reference

  • The primary MCP tool handler for 'get_torrent_stats'. Registered via @mcp.tool() decorator. It takes a torrent_id, fetches stats using the RqbitClient, handles errors, and returns JSON string.
    @mcp.tool() async def get_torrent_stats(torrent_id: str) -> str: """Get stats and status for a specific torrent by its ID or infohash.""" logger.info(f"Getting stats/status for torrent: {torrent_id}") result = await rqbit_client.get_torrent_stats(torrent_id) if isinstance(result, str): error = f"Error getting torrent stats {torrent_id}: {result}" logger.error(error) return error return dumps(result)
  • Helper method in RqbitClient wrapper that performs the actual HTTP request to the rqbit API endpoint /torrents/{id}/stats/v1 to retrieve torrent statistics.
    async def get_torrent_stats(self, id_or_infohash: str) -> dict[str, Any] | str: """Get stats for a specific torrent.""" return await self._safe_request("GET", f"/torrents/{id_or_infohash}/stats/v1") # type: ignore

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