registry.json 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. {
  2. "tools": [
  3. {
  4. "tool_id": "image_stitcher",
  5. "name": "图片拼接工具",
  6. "tool_slug_ids": [],
  7. "category": "cv",
  8. "description": "将多张图片按指定方向(水平/垂直/网格)拼接成一张大图。支持间距设置、背景色填充和统一缩放模式。输入输出均为 Base64 编码的 PNG 图片。",
  9. "input_schema": {
  10. "properties": {
  11. "background_color": {
  12. "default": "#FFFFFF",
  13. "description": "间距填充背景色,十六进制颜色值",
  14. "type": "string"
  15. },
  16. "columns": {
  17. "default": 2,
  18. "description": "grid 模式下每行的列数",
  19. "minimum": 1,
  20. "type": "integer"
  21. },
  22. "direction": {
  23. "default": "horizontal",
  24. "description": "拼接方向:horizontal=水平,vertical=垂直,grid=网格",
  25. "enum": [
  26. "horizontal",
  27. "vertical",
  28. "grid"
  29. ],
  30. "type": "string"
  31. },
  32. "images": {
  33. "description": "Base64 编码的图片列表,至少 2 张",
  34. "items": {
  35. "type": "string"
  36. },
  37. "minItems": 2,
  38. "type": "array"
  39. },
  40. "resize_mode": {
  41. "default": "none",
  42. "description": "缩放模式:none=不缩放,fit_width=统一宽度,fit_height=统一高度",
  43. "enum": [
  44. "none",
  45. "fit_width",
  46. "fit_height"
  47. ],
  48. "type": "string"
  49. },
  50. "spacing": {
  51. "default": 0,
  52. "description": "图片间距(像素)",
  53. "minimum": 0,
  54. "type": "integer"
  55. }
  56. },
  57. "reason": "图片拼接工具输入参数定义",
  58. "required": [
  59. "images"
  60. ],
  61. "type": "object"
  62. },
  63. "output_schema": {
  64. "properties": {
  65. "height": {
  66. "description": "结果图高度(像素)",
  67. "type": "integer"
  68. },
  69. "image": {
  70. "description": "拼接结果,Base64 编码的 PNG 图片",
  71. "type": "string"
  72. },
  73. "width": {
  74. "description": "结果图宽度(像素)",
  75. "type": "integer"
  76. }
  77. },
  78. "reason": "图片拼接工具输出结果定义",
  79. "required": [
  80. "image",
  81. "width",
  82. "height"
  83. ],
  84. "type": "object"
  85. },
  86. "stream_support": false,
  87. "status": "active"
  88. },
  89. {
  90. "tool_id": "liblibai_controlnet",
  91. "name": "LibLib ControlNet 图生图",
  92. "tool_slug_ids": [],
  93. "category": "cv",
  94. "description": "基于 LibLib AI 开放 API 的 ControlNet Canny 图生图工具,支持通过边缘检测控制图像生成",
  95. "input_schema": {
  96. "type": "object",
  97. "properties": {
  98. "image": {
  99. "type": "string",
  100. "description": "图片来源,支持 Base64 编码的图片数据或 HTTP 图片 URL"
  101. },
  102. "prompt": {
  103. "type": "string",
  104. "description": "正向提示词"
  105. },
  106. "negative_prompt": {
  107. "type": "string",
  108. "description": "反向提示词",
  109. "default": "lowres, bad anatomy, text, error"
  110. },
  111. "width": {
  112. "type": "integer",
  113. "description": "输出宽度",
  114. "default": 512
  115. },
  116. "height": {
  117. "type": "integer",
  118. "description": "输出高度",
  119. "default": 512
  120. },
  121. "steps": {
  122. "type": "integer",
  123. "description": "采样步数",
  124. "default": 20
  125. },
  126. "cfg_scale": {
  127. "type": "number",
  128. "description": "CFG Scale",
  129. "default": 7
  130. },
  131. "img_count": {
  132. "type": "integer",
  133. "description": "生成图片数量",
  134. "default": 1
  135. },
  136. "control_weight": {
  137. "type": "number",
  138. "description": "ControlNet 权重",
  139. "default": 1
  140. },
  141. "preprocessor": {
  142. "type": "integer",
  143. "description": "预处理器枚举",
  144. "default": 1
  145. },
  146. "canny_low": {
  147. "type": "integer",
  148. "description": "Canny 低阈值",
  149. "default": 100
  150. },
  151. "canny_high": {
  152. "type": "integer",
  153. "description": "Canny 高阈值",
  154. "default": 200
  155. }
  156. },
  157. "required": [
  158. "image",
  159. "prompt"
  160. ]
  161. },
  162. "output_schema": {
  163. "type": "object",
  164. "properties": {
  165. "images": {
  166. "type": "array",
  167. "items": {
  168. "type": "string"
  169. },
  170. "description": "生成的图片 URL 列表"
  171. },
  172. "task_id": {
  173. "type": "string",
  174. "description": "任务 ID"
  175. },
  176. "status": {
  177. "type": "string",
  178. "description": "任务状态(success/failed/timeout)"
  179. }
  180. }
  181. },
  182. "stream_support": false,
  183. "status": "active"
  184. },
  185. {
  186. "tool_id": "launch_comfy_env",
  187. "name": "Launch ComfyUI Environment",
  188. "tool_slug_ids": ["comfyui"],
  189. "category": "ai",
  190. "description": "启动 RunComfy 云端机器并等待就绪。返回 server_id 用于后续 ComfyUI workflow 执行。需要环境变量 RUNCOMFY_USER_ID 和 API_TOKEN。",
  191. "input_schema": {
  192. "type": "object",
  193. "properties": {
  194. "version_id": {
  195. "type": "string",
  196. "description": "RunComfy workflow version ID",
  197. "default": "90f77137-ba75-400d-870f-204c614ae8a3"
  198. },
  199. "server_type": {
  200. "type": "string",
  201. "enum": [
  202. "medium",
  203. "large",
  204. "extra-large",
  205. "2x-large",
  206. "2xl-turbo"
  207. ],
  208. "description": "机器规格",
  209. "default": "medium"
  210. },
  211. "duration": {
  212. "type": "integer",
  213. "description": "预估运行时长(秒)",
  214. "default": 3600
  215. }
  216. }
  217. },
  218. "output_schema": {
  219. "type": "object",
  220. "properties": {
  221. "server_id": {
  222. "type": "string",
  223. "description": "机器唯一标识,用于后续操作"
  224. },
  225. "comfy_url": {
  226. "type": "string",
  227. "description": "ComfyUI 访问地址"
  228. },
  229. "status": {
  230. "type": "string",
  231. "description": "机器状态"
  232. },
  233. "usage_instruction": {
  234. "type": "string",
  235. "description": "使用说明"
  236. }
  237. },
  238. "required": [
  239. "server_id",
  240. "comfy_url",
  241. "status",
  242. "usage_instruction"
  243. ]
  244. },
  245. "stream_support": false,
  246. "status": "active"
  247. },
  248. {
  249. "tool_id": "runcomfy_workflow_executor",
  250. "name": "RunComfy Workflow Executor",
  251. "tool_slug_ids": ["comfyui"],
  252. "category": "image_generation",
  253. "description": "在已就绪的 RunComfy 机器上提交 ComfyUI 工作流,上传输入文件,监听执行状态,下载结果图片(不启动/关闭机器)",
  254. "input_schema": {
  255. "type": "object",
  256. "required": [
  257. "server_id",
  258. "workflow_api"
  259. ],
  260. "properties": {
  261. "server_id": {
  262. "type": "string",
  263. "description": "已启动的 RunComfy 机器 ID"
  264. },
  265. "workflow_api": {
  266. "type": "object",
  267. "description": "ComfyUI workflow_api.json 内容(字典格式)"
  268. },
  269. "input_files": {
  270. "type": "array",
  271. "description": "可选的输入文件列表",
  272. "items": {
  273. "type": "object",
  274. "required": [
  275. "filename",
  276. "type",
  277. "base64_data"
  278. ],
  279. "properties": {
  280. "filename": {
  281. "type": "string",
  282. "description": "文件名"
  283. },
  284. "type": {
  285. "type": "string",
  286. "description": "文件类型:images/loras/checkpoints/vae/controlnet"
  287. },
  288. "base64_data": {
  289. "type": "string",
  290. "description": "文件的 Base64 编码数据"
  291. }
  292. }
  293. }
  294. }
  295. }
  296. },
  297. "output_schema": {
  298. "type": "object",
  299. "properties": {
  300. "prompt_id": {
  301. "type": "string",
  302. "description": "任务 ID"
  303. },
  304. "images": {
  305. "type": "array",
  306. "items": {
  307. "type": "string"
  308. },
  309. "description": "结果图片的 Base64 数据列表"
  310. },
  311. "status": {
  312. "type": "string",
  313. "description": "执行状态"
  314. },
  315. "server_id": {
  316. "type": "string",
  317. "description": "机器 ID"
  318. }
  319. }
  320. },
  321. "stream_support": false,
  322. "status": "active"
  323. },
  324. {
  325. "tool_id": "runcomfy_stop_env",
  326. "name": "RunComfy Stop Service",
  327. "tool_slug_ids": ["comfyui"],
  328. "category": "cloud",
  329. "description": "Stop and delete RunComfy server instances to release resources. Works with launch_comfy_env for complete lifecycle management.",
  330. "input_schema": {
  331. "type": "object",
  332. "properties": {
  333. "server_id": {
  334. "type": "string",
  335. "description": "The server ID to stop"
  336. }
  337. },
  338. "required": [
  339. "server_id"
  340. ]
  341. },
  342. "output_schema": {
  343. "type": "object",
  344. "properties": {
  345. "server_id": {
  346. "type": "string",
  347. "description": "The stopped server ID"
  348. },
  349. "status": {
  350. "type": "string",
  351. "description": "Deleted, NotFound, or Error"
  352. },
  353. "message": {
  354. "type": "string",
  355. "description": "Detailed result message"
  356. }
  357. }
  358. },
  359. "stream_support": false,
  360. "status": "active"
  361. }
  362. ],
  363. "version": "2.0"
  364. }