Skip to main content
Glama
pholex

Qinglong MCP Server

by pholex

run_subscription

Execute a specific subscription in Qinglong Panel to run scheduled tasks. Provide the subscription ID to trigger task execution and monitor results.

Instructions

运行指定的订阅

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscription_idYes订阅 ID

Implementation Reference

  • Handler function for the 'run_subscription' tool. Retrieves subscription_id, sends PUT request to Qinglong API /open/subscriptions/run, handles response or errors.
    elif tool_name == "run_subscription":
        subscription_id = arguments.get("subscription_id")
        try:
            url = f"{QINGLONG_URL}/open/subscriptions/run"
            headers = {"Authorization": f"Bearer {token}"}
            data = [subscription_id]
            
            resp = requests.put(url, headers=headers, json=data, 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:
            response = {
                "jsonrpc": "2.0",
                "id": request["id"],
                "result": {"content": [{"type": "text", "text": f"订阅 {subscription_id} 已成功运行"}]}
            }
        else:
            response = {
                "jsonrpc": "2.0",
                "id": request["id"],
                "error": {"code": -32603, "message": f"运行订阅失败: {result}"}
            }
  • Input schema defining subscription_id as required integer.
    "inputSchema": {
        "type": "object",
        "properties": {
            "subscription_id": {"type": "integer", "description": "订阅 ID"}
        },
        "required": ["subscription_id"]
    }
  • server.py:142-152 (registration)
    Tool registration in the tools/list method, including name, description, and schema.
    {
        "name": "run_subscription",
        "description": "运行指定的订阅",
        "inputSchema": {
            "type": "object",
            "properties": {
                "subscription_id": {"type": "integer", "description": "订阅 ID"}
            },
            "required": ["subscription_id"]
        }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the action ('run') but doesn't clarify if this is a read-only operation, a mutation, whether it's destructive, what permissions are needed, or what happens upon execution (e.g., triggers tasks, sends notifications). This is a significant gap for a tool with no 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 with zero wasted words. It's appropriately sized and front-loaded, directly stating the tool's action without unnecessary elaboration.

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 complexity implied by 'run' (likely a mutation), no annotations, no output schema, and sibling tools suggesting task-related operations, the description is incomplete. It doesn't explain what 'running a subscription' does, what the expected outcome is, or how it differs from similar tools, leaving critical gaps for agent understanding.

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

Parameters3/5

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

Schema description coverage is 100%, with the parameter 'subscription_id' documented as '订阅 ID' (subscription ID). The description adds no additional meaning beyond this, such as how to obtain valid IDs or format requirements. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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

Purpose3/5

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

The description '运行指定的订阅' (run the specified subscription) states a verb+resource combination, but it's vague about what 'running a subscription' actually entails. It doesn't distinguish this tool from sibling tools like 'run_task' or 'run_task_async', leaving ambiguity about whether this executes tasks, triggers workflows, or performs another action.

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?

There is no guidance on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing a valid subscription_id from 'list_subscriptions'), exclusions, or comparisons to siblings like 'run_task' or 'run_task_async'. This leaves the agent without context for tool selection.

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