pause_torrent
Pause an active torrent by providing its ID. Stops data transfer without deleting the torrent, allowing resumption later.
Instructions
Pause a torrent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| torrent_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- rqbit_client/mcp_server.py:90-99 (handler)MCP tool handler for 'pause_torrent'. Registers via @mcp.tool() decorator, calls rqbit_client.pause_torrent(), and returns a success/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 - rqbit_client/mcp_server.py:90-91 (registration)Registration of 'pause_torrent' as an MCP tool via the @mcp.tool() decorator on line 90 of mcp_server.py.
@mcp.tool() async def pause_torrent(torrent_id: str) -> str: - Helper client method that executes the HTTP POST request to /torrents/{id_or_infohash}/pause via the rqbit API.
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")