registry.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. {
  2. "tools": [
  3. {
  4. "tool_id": "image_stitcher",
  5. "name": "图片拼接工具",
  6. "category": "cv",
  7. "description": "将多张图片按指定方向(水平/垂直/网格)拼接成一张大图。支持间距设置、背景色填充和统一缩放模式。输入输出均为 Base64 编码的 PNG 图片。",
  8. "input_schema": {
  9. "properties": {
  10. "background_color": {
  11. "default": "#FFFFFF",
  12. "description": "间距填充背景色,十六进制颜色值",
  13. "type": "string"
  14. },
  15. "columns": {
  16. "default": 2,
  17. "description": "grid 模式下每行的列数",
  18. "minimum": 1,
  19. "type": "integer"
  20. },
  21. "direction": {
  22. "default": "horizontal",
  23. "description": "拼接方向:horizontal=水平,vertical=垂直,grid=网格",
  24. "enum": [
  25. "horizontal",
  26. "vertical",
  27. "grid"
  28. ],
  29. "type": "string"
  30. },
  31. "images": {
  32. "description": "Base64 编码的图片列表,至少 2 张",
  33. "items": {
  34. "type": "string"
  35. },
  36. "minItems": 2,
  37. "type": "array"
  38. },
  39. "resize_mode": {
  40. "default": "none",
  41. "description": "缩放模式:none=不缩放,fit_width=统一宽度,fit_height=统一高度",
  42. "enum": [
  43. "none",
  44. "fit_width",
  45. "fit_height"
  46. ],
  47. "type": "string"
  48. },
  49. "spacing": {
  50. "default": 0,
  51. "description": "图片间距(像素)",
  52. "minimum": 0,
  53. "type": "integer"
  54. }
  55. },
  56. "reason": "图片拼接工具输入参数定义",
  57. "required": [
  58. "images"
  59. ],
  60. "type": "object"
  61. },
  62. "output_schema": {
  63. "properties": {
  64. "height": {
  65. "description": "结果图高度(像素)",
  66. "type": "integer"
  67. },
  68. "image": {
  69. "description": "拼接结果,Base64 编码的 PNG 图片",
  70. "type": "string"
  71. },
  72. "width": {
  73. "description": "结果图宽度(像素)",
  74. "type": "integer"
  75. }
  76. },
  77. "reason": "图片拼接工具输出结果定义",
  78. "required": [
  79. "image",
  80. "width",
  81. "height"
  82. ],
  83. "type": "object"
  84. },
  85. "stream_support": false,
  86. "status": "active"
  87. },
  88. {
  89. "tool_id": "liblibai_controlnet",
  90. "name": "LibLib ControlNet 图生图",
  91. "category": "cv",
  92. "description": "基于 LibLib AI 开放 API 的 ControlNet Canny 图生图工具,支持通过边缘检测控制图像生成",
  93. "input_schema": {
  94. "type": "object",
  95. "properties": {
  96. "image": {
  97. "type": "string",
  98. "description": "图片来源,支持 Base64 编码的图片数据或 HTTP 图片 URL"
  99. },
  100. "prompt": {
  101. "type": "string",
  102. "description": "正向提示词"
  103. },
  104. "negative_prompt": {
  105. "type": "string",
  106. "description": "反向提示词",
  107. "default": "lowres, bad anatomy, text, error"
  108. },
  109. "width": {
  110. "type": "integer",
  111. "description": "输出宽度",
  112. "default": 512
  113. },
  114. "height": {
  115. "type": "integer",
  116. "description": "输出高度",
  117. "default": 512
  118. },
  119. "steps": {
  120. "type": "integer",
  121. "description": "采样步数",
  122. "default": 20
  123. },
  124. "cfg_scale": {
  125. "type": "number",
  126. "description": "CFG Scale",
  127. "default": 7
  128. },
  129. "img_count": {
  130. "type": "integer",
  131. "description": "生成图片数量",
  132. "default": 1
  133. },
  134. "control_weight": {
  135. "type": "number",
  136. "description": "ControlNet 权重",
  137. "default": 1
  138. },
  139. "preprocessor": {
  140. "type": "integer",
  141. "description": "预处理器枚举",
  142. "default": 1
  143. },
  144. "canny_low": {
  145. "type": "integer",
  146. "description": "Canny 低阈值",
  147. "default": 100
  148. },
  149. "canny_high": {
  150. "type": "integer",
  151. "description": "Canny 高阈值",
  152. "default": 200
  153. }
  154. },
  155. "required": [
  156. "image",
  157. "prompt"
  158. ]
  159. },
  160. "output_schema": {
  161. "type": "object",
  162. "properties": {
  163. "images": {
  164. "type": "array",
  165. "items": {
  166. "type": "string"
  167. },
  168. "description": "生成的图片 URL 列表"
  169. },
  170. "task_id": {
  171. "type": "string",
  172. "description": "任务 ID"
  173. },
  174. "status": {
  175. "type": "string",
  176. "description": "任务状态(success/failed/timeout)"
  177. }
  178. }
  179. },
  180. "stream_support": false,
  181. "status": "active"
  182. }
  183. ],
  184. "version": "2.0"
  185. }