start_torrent
Resume a paused or stopped torrent by specifying its unique torrent ID.
Instructions
Start (resume) 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:78-87 (handler)The MCP tool handler function for 'start_torrent'. Decorated with @mcp.tool(), it takes a torrent_id parameter, calls the client's start_torrent method, and returns a success or error string.
@mcp.tool() async def start_torrent(torrent_id: str) -> str: """Start (resume) a torrent.""" logger.info(f"Starting torrent: {torrent_id}") result = await rqbit_client.start_torrent(torrent_id) if isinstance(result, str): error = f"Error starting torrent {torrent_id}: {result}" logger.error(error) return error return "Successfully started torrent " + torrent_id - The RqbitClient wrapper method that executes the actual HTTP API call. Sends a POST request to /torrents/{id_or_infohash}/start to resume the torrent.
async def start_torrent(self, id_or_infohash: str) -> None | str: """Start (resume) a torrent.""" return await self._safe_request("POST", f"/torrents/{id_or_infohash}/start") - rqbit_client/mcp_server.py:78-78 (registration)The @mcp.tool() decorator on line 78 registers 'start_torrent' as an MCP tool. The tool name is derived from the function name 'start_torrent'.
@mcp.tool() - rqbit_client/mcp_server.py:79-79 (schema)The function signature for start_torrent defines the input schema: takes a string parameter 'torrent_id' and returns a string.
async def start_torrent(torrent_id: str) -> str: