Skip to main content
Glama
revelri

lutris-source-mcp

by revelri

pipeline_health

Check Prowlarr and qBittorrent connectivity and show current configuration.

Instructions

Verify Prowlarr + qBittorrent reachability and surface config. mutates: false

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `pipeline_health` function is the tool handler. It checks Prowlarr reachability (list_indexers), qBittorrent reachability (app_version), and surfaces config/policy info. Uses the @mcp.tool decorator with description 'Verify Prowlarr + qBittorrent reachability and surface config. mutates: false'. The function instantiates Prowlarr and Qbittorrent adapters from config, catches their respective errors, and returns a dict with prowlarr, qbittorrent, and policy status.
    @mcp.tool(description="Verify Prowlarr + qBittorrent reachability and surface config. mutates: false")
    def pipeline_health() -> dict[str, Any]:
        cfg = _cfg.load()
        out: dict[str, Any] = {
            "config_path": str(_cfg.CONFIG_PATH),
            "config_present": _cfg.CONFIG_PATH.exists(),
        }
        try:
            pw = Prowlarr(cfg.prowlarr)
            idx = pw.list_indexers()
            out["prowlarr"] = {
                "ok": True,
                "base_url": cfg.prowlarr.base_url,
                "indexers": [
                    {"id": i.get("id"), "name": i.get("name"),
                     "priority": i.get("priority"), "enable": i.get("enable")}
                    for i in idx
                ],
            }
        except ProwlarrError as exc:
            out["prowlarr"] = {"ok": False, "error": str(exc)}
    
        try:
            qb = Qbittorrent(cfg.qbittorrent)
            out["qbittorrent"] = {
                "ok": True,
                "base_url": cfg.qbittorrent.base_url,
                "version": qb.app_version(),
                "download_dir": cfg.qbittorrent.download_dir,
            }
        except QbError as exc:
            out["qbittorrent"] = {"ok": False, "error": str(exc)}
    
        out["policy"] = {
            "blocklist": cfg.policy.blocklist,
            "max_size_gb": cfg.policy.max_size_gb,
            "freeleech_only": cfg.policy.freeleech_only,
            "min_seeders": cfg.policy.min_seeders,
        }
        return out
  • The `@mcp.tool()` decorator registers the `pipeline_health` function as an MCP tool on the 'mcp' server object.
    @mcp.tool(description="Verify Prowlarr + qBittorrent reachability and surface config. mutates: false")
  • The function uses `_cfg.load()` to read configuration from a TOML file, `Prowlarr` and `Qbittorrent` adapter classes to check service health, and `_cfg.CONFIG_PATH` for path info. These are supporting utilities imported from other modules.
    def pipeline_health() -> dict[str, Any]:
        cfg = _cfg.load()
        out: dict[str, Any] = {
            "config_path": str(_cfg.CONFIG_PATH),
            "config_present": _cfg.CONFIG_PATH.exists(),
        }
        try:
            pw = Prowlarr(cfg.prowlarr)
            idx = pw.list_indexers()
            out["prowlarr"] = {
                "ok": True,
                "base_url": cfg.prowlarr.base_url,
                "indexers": [
                    {"id": i.get("id"), "name": i.get("name"),
                     "priority": i.get("priority"), "enable": i.get("enable")}
                    for i in idx
                ],
            }
        except ProwlarrError as exc:
            out["prowlarr"] = {"ok": False, "error": str(exc)}
    
        try:
            qb = Qbittorrent(cfg.qbittorrent)
            out["qbittorrent"] = {
                "ok": True,
                "base_url": cfg.qbittorrent.base_url,
                "version": qb.app_version(),
                "download_dir": cfg.qbittorrent.download_dir,
            }
        except QbError as exc:
            out["qbittorrent"] = {"ok": False, "error": str(exc)}
    
        out["policy"] = {
            "blocklist": cfg.policy.blocklist,
            "max_size_gb": cfg.policy.max_size_gb,
            "freeleech_only": cfg.policy.freeleech_only,
            "min_seeders": cfg.policy.min_seeders,
        }
        return out
Behavior4/5

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

The description explicitly states 'mutates: false', which is the key behavioral trait given no annotations. This adds value beyond the empty schema, though it could mention additional traits like 'requires active services' or 'returns health status details'.

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 a single concise sentence plus a key-value for mutation status. It is front-loaded and contains no extraneous information.

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

Completeness4/5

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

The description adequately explains the tool's purpose for a simple verification tool with no parameters. It could mention that it outputs a health status, but since an output schema exists, this is not required. Still, it is largely complete.

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?

With zero parameters and 100% schema coverage, the description does not need to add parameter info. The baseline 4 is appropriate; it provides the necessary context for a param-free tool.

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

Purpose5/5

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

The description clearly states it verifies reachability of Prowlarr and qBittorrent and surfaces config, using specific verbs and resources. It distinguishes from siblings which involve cancellation, preparation, setup, or stopping.

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

Usage Guidelines3/5

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

The description implies use for checking connectivity but lacks explicit context, such as when to use this over siblings (e.g., before triggering other operations). No exclusions or alternatives are mentioned.

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