{ "tools": [ { "tool_id": "image_stitcher", "name": "图片拼接工具", "category": "cv", "description": "将多张图片按指定方向(水平/垂直/网格)拼接成一张大图。支持间距设置、背景色填充和统一缩放模式。输入输出均为 Base64 编码的 PNG 图片。", "input_schema": { "properties": { "background_color": { "default": "#FFFFFF", "description": "间距填充背景色,十六进制颜色值", "type": "string" }, "columns": { "default": 2, "description": "grid 模式下每行的列数", "minimum": 1, "type": "integer" }, "direction": { "default": "horizontal", "description": "拼接方向:horizontal=水平,vertical=垂直,grid=网格", "enum": [ "horizontal", "vertical", "grid" ], "type": "string" }, "images": { "description": "Base64 编码的图片列表,至少 2 张", "items": { "type": "string" }, "minItems": 2, "type": "array" }, "resize_mode": { "default": "none", "description": "缩放模式:none=不缩放,fit_width=统一宽度,fit_height=统一高度", "enum": [ "none", "fit_width", "fit_height" ], "type": "string" }, "spacing": { "default": 0, "description": "图片间距(像素)", "minimum": 0, "type": "integer" } }, "reason": "图片拼接工具输入参数定义", "required": [ "images" ], "type": "object" }, "output_schema": { "properties": { "height": { "description": "结果图高度(像素)", "type": "integer" }, "image": { "description": "拼接结果,Base64 编码的 PNG 图片", "type": "string" }, "width": { "description": "结果图宽度(像素)", "type": "integer" } }, "reason": "图片拼接工具输出结果定义", "required": [ "image", "width", "height" ], "type": "object" }, "stream_support": false, "status": "active" }, { "tool_id": "liblibai_controlnet", "name": "LibLib ControlNet 图生图", "category": "cv", "description": "基于 LibLib AI 开放 API 的 ControlNet Canny 图生图工具,支持通过边缘检测控制图像生成", "input_schema": { "type": "object", "properties": { "image": { "type": "string", "description": "图片来源,支持 Base64 编码的图片数据或 HTTP 图片 URL" }, "prompt": { "type": "string", "description": "正向提示词" }, "negative_prompt": { "type": "string", "description": "反向提示词", "default": "lowres, bad anatomy, text, error" }, "width": { "type": "integer", "description": "输出宽度", "default": 512 }, "height": { "type": "integer", "description": "输出高度", "default": 512 }, "steps": { "type": "integer", "description": "采样步数", "default": 20 }, "cfg_scale": { "type": "number", "description": "CFG Scale", "default": 7 }, "img_count": { "type": "integer", "description": "生成图片数量", "default": 1 }, "control_weight": { "type": "number", "description": "ControlNet 权重", "default": 1 }, "preprocessor": { "type": "integer", "description": "预处理器枚举", "default": 1 }, "canny_low": { "type": "integer", "description": "Canny 低阈值", "default": 100 }, "canny_high": { "type": "integer", "description": "Canny 高阈值", "default": 200 } }, "required": [ "image", "prompt" ] }, "output_schema": { "type": "object", "properties": { "images": { "type": "array", "items": { "type": "string" }, "description": "生成的图片 URL 列表" }, "task_id": { "type": "string", "description": "任务 ID" }, "status": { "type": "string", "description": "任务状态(success/failed/timeout)" } } }, "stream_support": false, "status": "active" } ], "version": "2.0" }