Skip to main content
Glama
pholex

Qinglong MCP Server

by pholex

list_subscriptions

Retrieve all subscription lists from Qinglong Panel to monitor and manage scheduled tasks.

Instructions

查询青龙面板中的所有订阅列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for the 'list_subscriptions' tool. It authenticates with a Bearer token, makes a GET request to the Qinglong panel's /open/subscriptions endpoint, parses the response, formats the subscription list (ID, name, URL, type, schedule, status) into a readable text output, and returns it in the MCP response format. Handles errors appropriately.
    elif tool_name == "list_subscriptions":
        try:
            url = f"{QINGLONG_URL}/open/subscriptions"
            headers = {"Authorization": f"Bearer {token}"}
            resp = requests.get(url, headers=headers, timeout=10)
            result = resp.json()
        except Exception as e:
            response = {
                "jsonrpc": "2.0",
                "id": request["id"],
                "error": {"code": -32603, "message": f"请求失败: {str(e)}"}
            }
            print(json.dumps(response), flush=True)
            continue
        
        if result.get("code") == 200:
            subscriptions = result["data"] if isinstance(result["data"], list) else []
            subscriptions.sort(key=lambda x: x.get('id', 0))
            total = len(subscriptions)
            
            output = f"青龙面板: {QINGLONG_URL}\n共 {total} 个订阅:\n\n"
            for sub in subscriptions:
                output += f"ID: {sub.get('id')}\n"
                output += f"名称: {sub.get('name')}\n"
                output += f"URL: {sub.get('url')}\n"
                output += f"类型: {sub.get('type')}\n"
                output += f"定时: {sub.get('schedule')}\n"
                output += f"状态: {'启用' if sub.get('is_disabled') == 0 else '禁用'}\n"
                output += "-" * 50 + "\n"
            
            response = {
                "jsonrpc": "2.0",
                "id": request["id"],
                "result": {"content": [{"type": "text", "text": output}]}
            }
        else:
            response = {
                "jsonrpc": "2.0",
                "id": request["id"],
                "error": {"code": -32603, "message": f"获取订阅列表失败: {result}"}
            }
  • server.py:134-141 (registration)
    Registration of the 'list_subscriptions' tool in the tools/list MCP method response. Includes name, description, and empty input schema (no parameters required).
    {
        "name": "list_subscriptions",
        "description": "查询青龙面板中的所有订阅列表",
        "inputSchema": {
            "type": "object",
            "properties": {}
        }
    },
  • Input schema for 'list_subscriptions' tool: an empty object, indicating no input parameters are required.
    "inputSchema": {
        "type": "object",
        "properties": {}
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool queries lists, implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, returns paginated results, or details the output format. This is a significant gap for a tool with zero annotation coverage.

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, efficient sentence that directly states the tool's purpose without any wasted words. It's front-loaded and appropriately sized for a simple list operation, earning its place by clearly conveying the core functionality.

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's simplicity (0 parameters, no output schema) and lack of annotations, the description is incomplete. It doesn't explain what the output looks like (e.g., list format, data structure), behavioral aspects like error handling, or how it fits with siblings. For a tool with no structured data to rely on, more context is needed.

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 tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. Baseline is 4 for zero parameters, as it avoids unnecessary information.

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 ('查询' meaning 'query' or 'list') and resource ('青龙面板中的所有订阅列表' meaning 'all subscription lists in Qinglong panel'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'list_qinglong_tasks', which also lists items from the same system, so it misses full sibling differentiation.

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. It doesn't mention prerequisites, context for usage, or compare it to sibling tools like 'run_subscription' or 'list_qinglong_tasks', leaving the agent to infer usage based on the name alone.

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/pholex/qinglong-mcp-server'

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