Skip to main content
Glama
pholex

Qinglong MCP Server

by pholex

list_qinglong_tasks

Retrieve all scheduled tasks from Qinglong Panel to monitor and manage automated scripts and subscriptions.

Instructions

查询青龙面板中的所有定时任务列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_qinglong_tasks' tool. It retrieves the list of cron tasks from the Qinglong API endpoint /open/crons, formats the output with task details like ID, name, command, schedule, status, and last run time, and returns it as text content.
    if tool_name == "list_qinglong_tasks":
        try:
            url = f"{QINGLONG_URL}/open/crons"
            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:
            data = result["data"]
            crons = data.get("data", [])
            crons.sort(key=lambda x: x.get('id', 0))
            total = data.get("total", 0)
            
            output = f"青龙面板: {QINGLONG_URL}\n共 {total} 个任务:\n\n"
            for cron in crons:
                output += f"ID: {cron.get('id')}\n"
                output += f"名称: {cron.get('name')}\n"
                output += f"命令: {cron.get('command')}\n"
                output += f"定时: {cron.get('schedule')}\n"
                output += f"状态: {'启用' if cron.get('isDisabled') == 0 else '禁用'}\n"
                last_running = cron.get('last_running_time')
                if last_running:
                    output += f"上次运行时长: {last_running}秒\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:82-89 (registration)
    Registration of the 'list_qinglong_tasks' tool in the tools/list response, including name, description, and empty input schema.
    {
        "name": "list_qinglong_tasks",
        "description": "查询青龙面板中的所有定时任务列表",
        "inputSchema": {
            "type": "object",
            "properties": {}
        }
    },
  • Input schema for the 'list_qinglong_tasks' tool, which requires no parameters (empty properties).
    "inputSchema": {
        "type": "object",
        "properties": {}
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While '查询' implies a read-only operation, it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the output takes. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 redundant words or unnecessary elaboration. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 lack of annotations and output schema, the description is incomplete for a tool that likely returns a list of tasks. It doesn't explain what information is included in the task list, how results are structured, or any error conditions. For a read operation with no structured output documentation, 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 with 100% schema description coverage, so the schema already fully documents the input requirements. The description doesn't add parameter details (which isn't needed here), but it implies no filtering or options are available, aligning with the empty schema. This meets the baseline for zero-parameter tools.

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') and resource ('青龙面板中的所有定时任务列表' meaning 'all scheduled tasks in Qinglong panel'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get_task_status' or 'get_task_logs', which prevents a perfect score.

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 'get_task_status' or 'run_task'. It lacks explicit context about use cases, exclusions, or prerequisites, leaving the agent to infer usage from the tool 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