pause_torrent
Pause active torrent downloads to temporarily stop data transfer and conserve bandwidth or system resources.
Instructions
Pause a torrent.
Args: torrent_hash: Hash of the torrent to pause
Returns: Status message
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"torrent_hash": "<torrent_hash>"
},
"name": "pause_torrent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| torrent_hash | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:220-238 (handler)The pause_torrent tool handler function, decorated with @mcp.tool() for registration. It pauses the specified torrent using the qBittorrent client and returns a status dictionary.
@mcp.tool() def pause_torrent(torrent_hash: str) -> dict[str, str]: """ Pause a torrent. Args: torrent_hash: Hash of the torrent to pause Returns: Status message """ client = get_qbt_client() try: client.torrents_pause(torrent_hashes=torrent_hash) return {"status": "success", "message": f"Torrent {torrent_hash} paused"} except Exception as e: return {"status": "error", "message": str(e)}