Skip to main content
Glama
philogicae

rqbit Torrent Client MCP

delete_torrent

Remove a torrent and its associated files from the client by providing the torrent ID.

Instructions

Delete a torrent and its files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
torrent_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool registration (via @mcp.tool() decorator) that defines the 'delete_torrent' tool. Calls RqbitClient.delete_torrent() and returns success/error string.
    @mcp.tool()
    async def delete_torrent(torrent_id: str) -> str:
        """Delete a torrent and its files."""
        logger.info(f"Deleting torrent: {torrent_id}")
        result = await rqbit_client.delete_torrent(torrent_id)
        if isinstance(result, str):
            error = f"Error deleting torrent {torrent_id}: {result}"
            logger.error(error)
            return error
        return "Successfully deleted torrent " + torrent_id
  • Handler implementation: makes an HTTP POST request to the /torrents/{id}/delete endpoint of the rqbit API to delete the torrent and its files.
    async def delete_torrent(self, id_or_infohash: str) -> None | str:
        """Delete a torrent and its files."""
        return await self._safe_request("POST", f"/torrents/{id_or_infohash}/delete")
  • Helper that wraps _request with error handling, returning error string on HTTP failures.
    async def _safe_request(self, method: str, path: str, **kwargs) -> Any | str | None:
        try:
            return await self._request(method, path, **kwargs)
        except RqbitHTTPError as e:
            return str(e)
  • Core HTTP request helper that handles response parsing (JSON, binary, text, 204 No Content) and raises typed exceptions on errors.
    async def _request(self, method: str, path: str, **kwargs) -> Any:
        """Make a regular API request."""
        try:
            response = await self._client.request(method, path, **kwargs)
            response.raise_for_status()
            if response.status_code == 204:  # No Content
                return None
            if response.headers.get("content-type") == "application/json":
                return response.json()
            if response.headers.get("content-type") == "application/octet-stream":
                return await response.read()  # type: ignore
            return response.text
        except httpx.HTTPStatusError as e:
            raise RqbitHTTPError(
                f"HTTP error: {e.response.status_code} - {e.response.text}",
                status_code=e.response.status_code,
            ) from e
        except httpx.RequestError as e:
            raise RqbitHTTPError(f"Request error: {e}", status_code=0) from e
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It states 'delete' implying irreversibility and file removal, but lacks details on authorization requirements, rate limits, or whether it's truly destructive. The description is too minimal to provide full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely short (5 words), but this is conciseness at the cost of completeness. It is front-loaded but lacks necessary details. Not every sentence earns its place because it misses critical information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there is an output schema (unseen) and no annotations, the description is very incomplete. It does not specify the tornado_id meaning, what happens to associated data, or any side effects. Completely inadequate for a destructive operation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage and only one parameter 'torrent_id'. The description does not explain what the parameter represents, its format, or how to obtain it. The description adds no value beyond the schema's type and required field.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Delete' and the resource 'a torrent and its files', which is specific and helps differentiate from sibling 'forget_torrent' which might only remove from list. However, it doesn't explicitly contrast with alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like 'forget_torrent'. The description does not mention prerequisites, conditions, or context for use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/philogicae/rqbit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server