Skip to main content
Glama
revelri

lutris-source-mcp

by revelri

cancel_pipeline

Cancel an active torrent download by providing its infohash. Optionally delete associated files or require confirmation.

Instructions

Cancel an in-flight torrent. mutates: true

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
infohashYes
delete_filesNo
confirmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the cancel_pipeline MCP tool. Loads config, creates Qbittorrent client, and deletes the torrent by infohash, optionally removing files.
    @mcp.tool(description="Cancel an in-flight torrent. mutates: true")
    @confirm_required("cancel_pipeline")
    def cancel_pipeline(infohash: str, delete_files: bool = False, confirm: bool = False) -> dict[str, Any]:
        cfg = _cfg.load()
        qb = Qbittorrent(cfg.qbittorrent)
        qb.delete(infohash, delete_files=delete_files)
        return {"ok": True, "infohash": infohash, "deleted_files": delete_files}
  • Tool schema/definition: accepts infohash (str), delete_files (bool, default False), confirm (bool, default False). Returns dict with ok, infohash, deleted_files.
    @mcp.tool(description="Cancel an in-flight torrent. mutates: true")
    @confirm_required("cancel_pipeline")
    def cancel_pipeline(infohash: str, delete_files: bool = False, confirm: bool = False) -> dict[str, Any]:
        cfg = _cfg.load()
        qb = Qbittorrent(cfg.qbittorrent)
        qb.delete(infohash, delete_files=delete_files)
        return {"ok": True, "infohash": infohash, "deleted_files": delete_files}
  • Registered as an MCP tool via @mcp.tool decorator on the FastMCP instance from lutris_source_mcp.server.
    @mcp.tool(description="Cancel an in-flight torrent. mutates: true")
    @confirm_required("cancel_pipeline")
  • Module exports including cancel_pipeline.
    __all__ = ["prepare_install_source", "cancel_pipeline", "stop_seeding"]
  • Qbittorrent adapter delete method called by cancel_pipeline to delete the torrent via qBittorrent Web API.
    def delete(self, infohash: str, *, delete_files: bool = False) -> None:
        self._request(
            "POST", "/api/v2/torrents/delete",
            data={"hashes": infohash.lower(), "deleteFiles": str(delete_files).lower()},
        )
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It mentions 'mutates: true', indicating state change, but it does not disclose potential side effects (e.g., whether delete_files removes data, what confirm does, or impact on seeding).

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 very short (one sentence plus a note), which is concise but fails to provide sufficient information. The structure is front-loaded but not adequately informative.

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

Completeness2/5

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

Given the tool has 3 parameters, no annotation support, and an output schema that is not described, the description is incomplete. It does not explain return values or behavior beyond mutation.

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

Parameters2/5

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

With schema description coverage at 0%, the description should explain parameters. It only says 'Cancel an in-flight torrent', leaving 'infohash', 'delete_files', and 'confirm' largely unexplained beyond their names.

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 ('Cancel') and the resource ('an in-flight torrent'), providing a specific verb and resource. However, it does not differentiate from sibling tool 'stop_seeding', which might have overlapping functionality.

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 is provided on when to use this tool versus alternatives like 'stop_seeding'. There is no mention of prerequisites, context, or exclusions.

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/revelri/lutris-source-mcp'

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