ImageGen-Studio / mcp_tools /get_task_list.py
BlueSkyXN's picture
Unify image references and guided UI/API workflows
ca9a89c verified
Raw History Blame Contribute Delete
912 Bytes
"""
MCP Tool: get_task_list
Get a list of all supported image generation task types along with their required/optional parameter lists.
"""
from .common import _TASK_DEFINITIONS
import copy
def handle_get_task_list() -> list:
"""Get a list of all supported image generation task types along with their required/optional parameter lists."""
tasks = copy.deepcopy(_TASK_DEFINITIONS)
for task in tasks:
if "image" in task["required_inputs"] or "images" in task["required_inputs"]:
task["image_input_alternatives"] = {
"choose_exactly_one": ["image", "images", "numbered fields (img1 / 图1 / image1, ...)"],
"description": "image is a single source; images is an ordered list. Numbered fields replace images. See get_model_features.image_workflows for task/run_mode constraints. Never send multiple forms together.",
}
return tasks