{
  "name": "generate",
  "title": "报告生成",
  "description": "根据标题、摘要和章节数据生成Markdown或HTML报告，可保存为文件。触发关键词：生成报告、日报、周报、分析报告、报告生成",
  "category": "报告管理",
  "group": "report",
  "type": "function",
  "main": "./index.js",
  "params": [
    {
      "name": "title",
      "description": "报告标题",
      "type": "string",
      "required": true
    },
    {
      "name": "summary",
      "description": "报告摘要（可选）",
      "type": "string"
    },
    {
      "name": "sections",
      "description": "章节列表，每项包含title、content(文本)或items(数组，对象自动转表格，字符串转列表)",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "items": {
            "type": "array"
          }
        }
      }
    },
    {
      "name": "format",
      "description": "报告格式，默认markdown",
      "type": "string",
      "default": "markdown",
      "enum": ["markdown", "html"]
    },
    {
      "name": "output",
      "description": "输出文件路径（可选，不填仅返回内容）",
      "type": "string"
    }
  ],
  "returns": [
    {
      "name": "code",
      "type": "number",
      "description": "返回代码，0表示成功",
      "default": 0,
      "required": true
    },
    {
      "name": "msg",
      "type": "string",
      "description": "返回消息",
      "default": "",
      "required": true
    },
    {
      "name": "data",
      "type": "object",
      "description": "生成结果，包含format/content/output"
    }
  ]
}
