Skip to main content
Glama
philogicae

rqbit Torrent Client MCP

get_torrent_stats

Retrieve detailed stats and status information for a torrent using its ID or infohash through the rqbit Torrent Client MCP server.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
torrent_idYes

Implementation Reference

  • MCP tool handler and registration for 'get_torrent_stats'. Fetches torrent stats via RqbitClient and serializes to JSON string, handling errors.
    @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)
  • RqbitClient helper method that performs the HTTP GET request to the rqbit API endpoint for torrent stats.
    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

Other Tools

Related Tools

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