forget_torrent
Remove a torrent from the rqbit client's active list while preserving downloaded files on your system.
Instructions
Forget a torrent, keeping the files.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| torrent_id | Yes |
Implementation Reference
- rqbit_client/mcp_server.py:102-111 (handler)MCP tool handler for the 'forget_torrent' tool. Decorated with @mcp.tool() for registration. Calls the RqbitClient wrapper method and handles response with logging and error messages.@mcp.tool() async def forget_torrent(torrent_id: str) -> str: """Forget a torrent, keeping the files.""" logger.info(f"Forgetting torrent: {torrent_id}") result = await rqbit_client.forget_torrent(torrent_id) if isinstance(result, str): error = f"Error forgetting torrent {torrent_id}: {result}" logger.error(error) return error return "Successfully forgot torrent " + torrent_id
- Supporting method in RqbitClient wrapper that performs the HTTP POST request to the rqbit API endpoint /torrents/{id_or_infohash}/forget to forget the torrent.async def forget_torrent(self, id_or_infohash: str) -> None | str: """Forget a torrent, keeping the files.""" return await self._safe_request("POST", f"/torrents/{id_or_infohash}/forget")
- rqbit_client/mcp_server.py:102-102 (registration)The @mcp.tool() decorator registers the forget_torrent function as an MCP tool.@mcp.tool()