Skip to main content
Glama
jabberjabberjabber

qBittorrent MCP Server

delete_torrent

Remove torrents from qBittorrent client with option to delete associated downloaded files, freeing up storage space and managing download queue.

Instructions

Delete a torrent from qBittorrent.

Args: torrent_hash: Hash of the torrent to delete delete_files: Also delete downloaded files (default: False)

Returns: Status message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delete_filesNo
torrent_hashYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:260-282 (handler)
    The delete_torrent tool handler, decorated with @mcp.tool() for registration, implements deletion of a torrent from qBittorrent, optionally deleting files, using the qBittorrent client.
    @mcp.tool()
    def delete_torrent(torrent_hash: str, delete_files: bool = False) -> dict[str, str]:
        """
        Delete a torrent from qBittorrent.
    
        Args:
            torrent_hash: Hash of the torrent to delete
            delete_files: Also delete downloaded files (default: False)
    
        Returns:
            Status message
        """
        client = get_qbt_client()
    
        try:
            client.torrents_delete(delete_files=delete_files, torrent_hashes=torrent_hash)
            return {
                "status": "success",
                "message": f"Torrent {torrent_hash} deleted (files deleted: {delete_files})"
            }
        except Exception as e:
            return {"status": "error", "message": str(e)}
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that deletion can optionally include files, which hints at destructive behavior, but doesn't clarify whether this action is reversible, what permissions are required, or what happens to partially downloaded torrents. The return value is vaguely described as 'Status message' without indicating success/failure patterns.

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

Conciseness5/5

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

The description is efficiently structured with a clear purpose statement followed by organized Arg/Return sections. Every sentence adds value without redundancy, and the information is front-loaded with the core functionality stated first.

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

Completeness3/5

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

For a destructive operation with no annotations, the description is minimally adequate. It covers the basic action and parameters but lacks important context about irreversible consequences, error conditions, and relationship to sibling tools. The presence of an output schema helps, but the description's 'Status message' is too vague to fully understand behavioral outcomes.

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

Parameters4/5

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

The description provides clear semantic meaning for both parameters beyond the schema's basic types: 'torrent_hash' is explained as 'Hash of the torrent to delete' and 'delete_files' as 'Also delete downloaded files' with its default value. Since schema description coverage is 0%, this compensates well, though it doesn't explain hash format or file deletion scope.

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 action ('Delete a torrent') and the target resource ('from qBittorrent'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'pause_torrent' or 'resume_torrent' in terms of permanent removal versus temporary state changes.

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?

The description provides no guidance on when to use this tool versus alternatives like 'pause_torrent' or 'resume_torrent'. There's no mention of prerequisites, consequences, or scenarios where deletion is appropriate versus other torrent management operations.

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/jabberjabberjabber/qbit-mcp'

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