Skip to main content
Glama
iflytek

dolphin-mcp-pilot

Official
by iflytek

ds_create_dag_workflow

Create a generic DAG workflow for any task type: SQL, Shell, Python, HTTP, or sub-process. Define task dependencies, retry policies, and optional cron schedules to automate data pipelines.

Instructions

Create a generic DAG workflow supporting any task type (SQL/SHELL/PYTHON/DEPENDENT/SUB_PROCESS/HTTP etc.).

    Args:
        project_name: Project name
        name: Workflow name
        tasks: Task definition list (see examples below)
        relations: Dependency list [{"from": "taskA", "to": "taskB"}]; empty "from" = start node
        description: Description
        schedule: Whether to create a schedule
        schedule_cron: Cron expression (7-field Quartz style)
        locations: Optional node coordinates [{"task_name": "check", "x": 100, "y": 100}]
                   Leave empty for auto-layout (horizontal, 300x200 spacing)

    tasks example:
        [
            # SHELL task (script required, resource_list optional)
            {"name": "check", "type": "SHELL",
             "script": "#!/bin/bash

python3 /public/check_partition.py table_name $[yyyyMMdd-1]", "resource_list": [67], # optional: referenced resource id or path "fail_retry_times": 3}, # optional: retry count on failure

            # SQL task (datasource_id + sql required)
            {"name": "sql1", "type": "SQL",
             "datasource_id": 1, "sql": "SELECT 1",
             "sql_type": "HIVE",              # optional, default HIVE
             "sql_type_select": 1},           # optional, 0=query 1=non-query (default 1)

            # DEPENDENT task (wait for upstream workflow completion)
            {"name": "wait", "type": "DEPENDENT",
             "depend_items": [{"project_code": 123, "definition_code": 456,
                               "cycle": "day", "date_value": "today"}]},

            # SUB_PROCESS task (invoke a sub-workflow)
            {"name": "sub", "type": "SUB_PROCESS",
             "sub_process_code": 21505676237440},

            # HTTP task
            {"name": "notify", "type": "HTTP",
             "http_url": "https://api.example.com/callback",
             "http_method": "POST"}
        ]
    relations example:
        [
            {"from": "", "to": "check"},      # check is a start node (empty "from")
            {"from": "check", "to": "sql1"},
            {"from": "wait", "to": "sql1"}    # wait and check run in parallel, both feed sql1
        ]

    resource_list format:
        - Recommended: resource_id (int): [67, 58]
        - Or full path (str): ["/public/check_partition.py"]
        - Paths must start with /
        - Use ds_list_resources() to view all resources with their ids and paths
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
tasksYes
scheduleNo
locationsNo
relationsYes
descriptionNo
project_nameYes
schedule_cronNo0 0 6 * * ? *
Behavior3/5

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

With no annotations, the description carries the burden. It explains structural behaviors (e.g., empty 'from' as start node, auto-layout) but does not disclose side effects like overwriting behavior, validation rules, authentication needs, or failure modes. This is a clear gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured with clear sections and examples. Every element earns its place; it could be slightly more concise, but the complexity justifies the length.

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

Completeness5/5

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

For a complex creation tool with 8 parameters and no output schema, the description covers all necessary details: task types with required fields, relation syntax, cron format, optional locations, and resource formats. It is complete enough for an agent to construct a valid request.

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

Parameters5/5

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

Schema coverage is 0%, but the description fully compensates with detailed explanations of every parameter, including task type structures, relation examples, schedule cron format, and resource_list formatting. It even references ds_list_resources() for context.

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 explicitly states 'Create a generic DAG workflow supporting any task type' with a specific verb, resource, and scope. It distinguishes this from sibling tools like ds_create_workflow and ds_modify_workflow_dag by emphasizing generic task support and the DAG structure.

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

Usage Guidelines4/5

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

Provides extensive usage context with task type examples, relation semantics, and layout guidance. However, it does not explicitly state when to prefer this tool over alternatives or list exclusions, so it falls short of a 5.

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/iflytek/dolphin-mcp-pilot'

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