{
  "name": "json",
  "title": "JSON格式验证器",
  "description": "验证 JSON 语法与 work.json 字段规范，返回问题列表。适用场景：生成 workflow.json 后的合法性校验、修复前问题定位时。工作流提示：code 填待校验内容、rules 选检查规则（语法/必填字段/命名/版本/描述长度等），结果看 valid、errors、error_count。",
  "type": "core",
  "params": {
    "type": "object",
    "properties": {
      "code": {
        "type": "string",
        "description": "待验证的JSON内容"
      },
      "rules": {
        "type": "array",
        "description": "检查规则列表: syntax/required_fields/name_format/version_format/description_length"
      }
    },
    "required": [
      "code"
    ]
  },
  "returns": {
    "type": "object",
    "description": "验证结果，正常时包含 valid/tip/errors/error_count/line_count，异常时包含 error",
    "properties": {
      "valid": {
        "type": "boolean",
        "description": "是否通过验证"
      },
      "tip": {
        "type": "string",
        "description": "验证提示信息"
      },
      "errors": {
        "type": "array",
        "description": "发现的问题列表"
      },
      "error_count": {
        "type": "number",
        "description": "问题数量"
      },
      "line_count": {
        "type": "number",
        "description": "JSON行数"
      },
      "error": {
        "type": "object",
        "description": "错误信息，仅调用出错时返回",
        "properties": {
          "code": {
            "type": "string",
            "description": "错误码"
          },
          "message": {
            "type": "string",
            "description": "错误描述"
          }
        }
      }
    }
  },
  "options": {},
  "group": "struct"
}
