forget_torrent
Remove a torrent from the rqbit Torrent Client MCP list while preserving downloaded files, ensuring your data remains intact.
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 forget_torrent. This is the main entry point for the tool, decorated with @mcp.tool(). It calls the RqbitClient's forget_torrent method and handles the response, returning a success message or error.@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
- Helper method in RqbitClient wrapper that performs the actual HTTP POST request to the rqbit API endpoint /torrents/{id}/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()