forget_torrent
Remove a torrent from the client without deleting downloaded files. Specify the torrent ID to stop tracking it while preserving data.
Instructions
Forget a torrent, keeping the files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| torrent_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- rqbit_client/mcp_server.py:102-111 (handler)The MCP tool handler for 'forget_torrent'. It receives a torrent_id, logs the action, calls the client helper, and returns a success/error message.
@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 - rqbit_client/mcp_server.py:102-102 (registration)The @mcp.tool() decorator that registers 'forget_torrent' as an MCP tool.
@mcp.tool() - The RqbitClient.forget_torrent method that makes the actual HTTP POST request to the rqbit API endpoint /torrents/{id_or_infohash}/forget.
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")