pause_torrent
Pause active torrent downloads in the rqbit Torrent Client MCP server to manage bandwidth or temporarily stop transfers.
Instructions
Pause a torrent.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| torrent_id | Yes |
Implementation Reference
- rqbit_client/mcp_server.py:90-99 (handler)MCP tool handler for 'pause_torrent', decorated with @mcp.tool(). Handles input validation via type hints, logs the action, calls the underlying client, and returns success or error message.@mcp.tool() async def pause_torrent(torrent_id: str) -> str: """Pause a torrent.""" logger.info(f"Pausing torrent: {torrent_id}") result = await rqbit_client.pause_torrent(torrent_id) if isinstance(result, str): error = f"Error pausing torrent {torrent_id}: {result}" logger.error(error) return error return "Successfully paused torrent " + torrent_id
- Underlying RQBit client wrapper method that sends a POST request to the RQBit server to pause the specified torrent.async def pause_torrent(self, id_or_infohash: str) -> None | str: """Pause a torrent.""" return await self._safe_request("POST", f"/torrents/{id_or_infohash}/pause")
- rqbit_client/mcp_server.py:90-90 (registration)Registration of the 'pause_torrent' tool using the MCP @mcp.tool() decorator.@mcp.tool()