pause_torrent
Temporarily halt a torrent download or upload by specifying its ID. Use this tool to control torrent activity within the rqbit Torrent Client MCP server.
Instructions
Pause a torrent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| torrent_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"torrent_id": {
"title": "Torrent Id",
"type": "string"
}
},
"required": [
"torrent_id"
],
"type": "object"
}
Implementation Reference
- rqbit_client/mcp_server.py:90-99 (handler)MCP tool handler decorated with @mcp.tool() that executes the pause_torrent logic by calling RqbitClient.pause_torrent and handling the response.@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
- RqbitClient wrapper method implementing pause_torrent by sending a POST request to the rqbit API endpoint /torrents/{id}/pause.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")