{
  "spec": "orgrelay-connector/1",
  "version": "1.1.0",
  "conventions": {
    "naming": "工具名 = 领域.动作，全小写，领域 2-24 位、动作 2-40 位，例如 orders.search",
    "pagination": "列表类工具输入 cursor + limit（默认 20，最大 100），输出 items + next_cursor（没有更多为 null）",
    "money": "金额一律 { amount: number, currency: ISO 4217 }",
    "time": "日期 YYYY-MM-DD；时间 ISO 8601 带时区，如 2026-11-09T10:00:00+08:00",
    "output": "MCP：结果放在 structuredContent（同时在 content 里放一份 JSON 文本）；REST 兼容模式：返回 { \"result\": ... }",
    "write": "会改数据的工具 access 必须是 write；必须支持幂等键（MCP 的 _meta[\"orgrelay/idempotency_key\"]，REST 的 Idempotency-Key 头），同一个键 24 小时内重复调用只执行一次并返回第一次的结果"
  },
  "domains": [
    "orders",
    "inventory",
    "products",
    "customers",
    "purchase",
    "logistics",
    "finance",
    "hr",
    "tickets",
    "seo",
    "ads",
    "content",
    "tasks",
    "reports"
  ],
  "tools": [
    {
      "name": "orders.search",
      "access": "read",
      "title": "查询订单",
      "description": "按时间、状态、客户、渠道查订单。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "pending",
              "paid",
              "shipped",
              "completed",
              "cancelled",
              "refunded"
            ]
          },
          "customer": {
            "type": "string",
            "description": "客户名称关键词"
          },
          "channel": {
            "type": "string",
            "description": "渠道"
          },
          "date_from": {
            "type": "string",
            "description": "下单日期起",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "description": "下单日期止",
            "format": "date"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "order_no": {
                  "type": "string",
                  "description": "订单号"
                },
                "status": {
                  "type": "string",
                  "description": "状态",
                  "enum": [
                    "pending",
                    "paid",
                    "shipped",
                    "completed",
                    "cancelled",
                    "refunded"
                  ]
                },
                "customer": {
                  "type": "string",
                  "description": "客户名称"
                },
                "customer_id": {
                  "type": "string",
                  "description": "客户编号"
                },
                "total": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "channel": {
                  "type": "string",
                  "description": "销售渠道，如 amazon、shopify、offline"
                },
                "created_at": {
                  "type": "string",
                  "description": "下单时间",
                  "format": "date-time"
                }
              },
              "required": [
                "order_no",
                "status",
                "total",
                "created_at"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "orders.get",
      "access": "read",
      "title": "订单详情",
      "description": "按订单号查看明细（商品行、地址、物流）。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_no": {
            "type": "string",
            "description": "订单号"
          }
        },
        "required": [
          "order_no"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "order_no": {
            "type": "string",
            "description": "订单号"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "pending",
              "paid",
              "shipped",
              "completed",
              "cancelled",
              "refunded"
            ]
          },
          "customer": {
            "type": "string",
            "description": "客户名称"
          },
          "customer_id": {
            "type": "string",
            "description": "客户编号"
          },
          "total": {
            "type": "object",
            "description": "金额",
            "properties": {
              "amount": {
                "type": "number",
                "description": "金额，十进制数"
              },
              "currency": {
                "type": "string",
                "description": "ISO 4217 币种，如 CNY、USD"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "channel": {
            "type": "string",
            "description": "销售渠道，如 amazon、shopify、offline"
          },
          "created_at": {
            "type": "string",
            "description": "下单时间",
            "format": "date-time"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "description": "SKU"
                },
                "qty": {
                  "type": "integer",
                  "description": "数量"
                },
                "price": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                }
              }
            }
          },
          "shipping_address": {
            "type": "string",
            "description": "收货地址（可脱敏）"
          },
          "tracking_no": {
            "type": "string",
            "description": "物流单号"
          }
        },
        "required": [
          "order_no",
          "status"
        ]
      }
    },
    {
      "name": "orders.update_status",
      "access": "write",
      "title": "修改订单状态",
      "description": "改状态（如取消、标记已发货）。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_no": {
            "type": "string",
            "description": "订单号"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "pending",
              "paid",
              "shipped",
              "completed",
              "cancelled",
              "refunded"
            ]
          },
          "reason": {
            "type": "string",
            "description": "原因"
          }
        },
        "required": [
          "order_no",
          "status"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "inventory.list",
      "access": "read",
      "title": "查询库存",
      "description": "按 SKU、仓库查库存；low_only 只看低于安全库存。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "SKU"
          },
          "warehouse": {
            "type": "string",
            "description": "仓库编码"
          },
          "low_only": {
            "type": "boolean",
            "description": "只看低于安全库存"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "description": "SKU"
                },
                "name": {
                  "type": "string",
                  "description": "商品名称"
                },
                "warehouse": {
                  "type": "string",
                  "description": "仓库编码"
                },
                "on_hand": {
                  "type": "integer",
                  "description": "现有数量"
                },
                "available": {
                  "type": "integer",
                  "description": "可用数量"
                },
                "safety_stock": {
                  "type": "integer",
                  "description": "安全库存"
                }
              },
              "required": [
                "sku",
                "on_hand"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "inventory.adjust",
      "access": "write",
      "title": "调整库存",
      "description": "按盘点结果增减库存。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "SKU"
          },
          "warehouse": {
            "type": "string",
            "description": "仓库编码"
          },
          "delta": {
            "type": "integer",
            "description": "增减数量，负数为减少"
          },
          "reason": {
            "type": "string",
            "description": "原因"
          }
        },
        "required": [
          "sku",
          "delta",
          "reason"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          },
          "on_hand": {
            "type": "integer",
            "description": "调整后数量"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "products.search",
      "access": "read",
      "title": "查询商品",
      "description": "按关键词、分类、状态查商品 / Listing。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "description": "关键词"
          },
          "category": {
            "type": "string",
            "description": "分类"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "active",
              "inactive",
              "draft"
            ]
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "description": "SKU"
                },
                "name": {
                  "type": "string",
                  "description": "名称"
                },
                "price": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "status": {
                  "type": "string",
                  "description": "状态",
                  "enum": [
                    "active",
                    "inactive",
                    "draft"
                  ]
                },
                "category": {
                  "type": "string",
                  "description": "分类"
                },
                "updated_at": {
                  "type": "string",
                  "description": "更新时间",
                  "format": "date-time"
                }
              },
              "required": [
                "sku",
                "name"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "products.get",
      "access": "read",
      "title": "商品详情",
      "description": "按 SKU 查看商品。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "SKU"
          }
        },
        "required": [
          "sku"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "SKU"
          },
          "name": {
            "type": "string",
            "description": "名称"
          },
          "price": {
            "type": "object",
            "description": "金额",
            "properties": {
              "amount": {
                "type": "number",
                "description": "金额，十进制数"
              },
              "currency": {
                "type": "string",
                "description": "ISO 4217 币种，如 CNY、USD"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "active",
              "inactive",
              "draft"
            ]
          },
          "category": {
            "type": "string",
            "description": "分类"
          },
          "updated_at": {
            "type": "string",
            "description": "更新时间",
            "format": "date-time"
          }
        },
        "required": [
          "sku",
          "name"
        ]
      }
    },
    {
      "name": "products.update_price",
      "access": "write",
      "title": "修改价格",
      "description": "改一个 SKU 的售价。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "SKU"
          },
          "price": {
            "type": "object",
            "description": "金额",
            "properties": {
              "amount": {
                "type": "number",
                "description": "金额，十进制数"
              },
              "currency": {
                "type": "string",
                "description": "ISO 4217 币种，如 CNY、USD"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "channel": {
            "type": "string",
            "description": "只改某个渠道的价格（可选）"
          }
        },
        "required": [
          "sku",
          "price"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "customers.search",
      "access": "read",
      "title": "查询客户",
      "description": "按关键词、等级、国家查客户。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "description": "名称、联系人、邮箱关键词"
          },
          "level": {
            "type": "string",
            "description": "等级"
          },
          "country": {
            "type": "string",
            "description": "国家/地区"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "customer_id": {
                  "type": "string",
                  "description": "客户编号"
                },
                "name": {
                  "type": "string",
                  "description": "名称"
                },
                "level": {
                  "type": "string",
                  "description": "等级"
                },
                "country": {
                  "type": "string",
                  "description": "国家/地区（ISO 3166-1 alpha-2）"
                },
                "owner": {
                  "type": "string",
                  "description": "负责人"
                },
                "last_order_at": {
                  "type": "string",
                  "description": "最近下单时间",
                  "format": "date-time"
                }
              },
              "required": [
                "customer_id",
                "name"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "customers.get",
      "access": "read",
      "title": "客户详情",
      "description": "客户档案、联系人、累计订单。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "description": "客户编号"
          }
        },
        "required": [
          "customer_id"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "description": "客户编号"
          },
          "name": {
            "type": "string",
            "description": "名称"
          },
          "level": {
            "type": "string",
            "description": "等级"
          },
          "country": {
            "type": "string",
            "description": "国家/地区（ISO 3166-1 alpha-2）"
          },
          "owner": {
            "type": "string",
            "description": "负责人"
          },
          "last_order_at": {
            "type": "string",
            "description": "最近下单时间",
            "format": "date-time"
          },
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "姓名"
                },
                "title": {
                  "type": "string",
                  "description": "职位"
                },
                "email": {
                  "type": "string",
                  "description": "邮箱"
                },
                "phone": {
                  "type": "string",
                  "description": "电话"
                }
              }
            }
          },
          "lifetime_value": {
            "type": "object",
            "description": "金额",
            "properties": {
              "amount": {
                "type": "number",
                "description": "金额，十进制数"
              },
              "currency": {
                "type": "string",
                "description": "ISO 4217 币种，如 CNY、USD"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "orders_count": {
            "type": "integer",
            "description": "累计订单数"
          }
        },
        "required": [
          "customer_id",
          "name"
        ]
      }
    },
    {
      "name": "customers.add_note",
      "access": "write",
      "title": "添加客户跟进记录",
      "description": "在客户档案里加一条跟进记录。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "description": "客户编号"
          },
          "note": {
            "type": "string",
            "description": "内容"
          }
        },
        "required": [
          "customer_id",
          "note"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "purchase.search",
      "access": "read",
      "title": "查询采购单",
      "description": "按供应商、状态、日期查采购单。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "supplier": {
            "type": "string",
            "description": "供应商"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "draft",
              "approved",
              "ordered",
              "partially_received",
              "received",
              "cancelled"
            ]
          },
          "date_from": {
            "type": "string",
            "description": "起",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "description": "止",
            "format": "date"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "po_no": {
                  "type": "string",
                  "description": "采购单号"
                },
                "supplier": {
                  "type": "string",
                  "description": "供应商"
                },
                "status": {
                  "type": "string",
                  "description": "状态"
                },
                "total": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "eta": {
                  "type": "string",
                  "description": "预计到货",
                  "format": "date"
                }
              },
              "required": [
                "po_no",
                "status"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "purchase.create",
      "access": "write",
      "title": "新建采购单",
      "description": "建一张采购单草稿。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "description": "供应商编号"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "description": "SKU"
                },
                "qty": {
                  "type": "integer",
                  "description": "数量"
                },
                "unit_price": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                }
              },
              "required": [
                "sku",
                "qty"
              ]
            }
          },
          "eta": {
            "type": "string",
            "description": "期望到货",
            "format": "date"
          },
          "note": {
            "type": "string",
            "description": "备注"
          }
        },
        "required": [
          "supplier_id",
          "lines"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          },
          "po_no": {
            "type": "string",
            "description": "采购单号"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "logistics.shipments",
      "access": "read",
      "title": "查询发货 / 物流",
      "description": "按订单号、物流单号、状态查发货和轨迹。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_no": {
            "type": "string",
            "description": "订单号"
          },
          "tracking_no": {
            "type": "string",
            "description": "物流单号"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "label_created",
              "in_transit",
              "delivered",
              "exception",
              "returned"
            ]
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "shipment_id": {
                  "type": "string",
                  "description": "发货单号"
                },
                "order_no": {
                  "type": "string",
                  "description": "订单号"
                },
                "carrier": {
                  "type": "string",
                  "description": "承运商"
                },
                "tracking_no": {
                  "type": "string",
                  "description": "物流单号"
                },
                "status": {
                  "type": "string",
                  "description": "状态"
                },
                "last_event": {
                  "type": "string",
                  "description": "最新轨迹"
                },
                "updated_at": {
                  "type": "string",
                  "description": "更新时间",
                  "format": "date-time"
                }
              },
              "required": [
                "shipment_id",
                "status"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "logistics.create_shipment",
      "access": "write",
      "title": "发货",
      "description": "为订单创建发货（打单）。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_no": {
            "type": "string",
            "description": "订单号"
          },
          "carrier": {
            "type": "string",
            "description": "承运商"
          },
          "service": {
            "type": "string",
            "description": "服务类型"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "description": "SKU"
                },
                "qty": {
                  "type": "integer",
                  "description": "数量"
                }
              }
            }
          }
        },
        "required": [
          "order_no"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          },
          "tracking_no": {
            "type": "string",
            "description": "物流单号"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "finance.summary",
      "access": "read",
      "title": "收支汇总",
      "description": "一段时间的收入、成本、费用、利润。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "date_from": {
            "type": "string",
            "description": "起",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "description": "止",
            "format": "date"
          },
          "group_by": {
            "type": "string",
            "description": "分组",
            "enum": [
              "day",
              "week",
              "month",
              "channel",
              "store"
            ]
          }
        },
        "required": [
          "date_from",
          "date_to"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "分组值"
                },
                "revenue": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "cost": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "expenses": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "profit": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                }
              }
            }
          },
          "currency": {
            "type": "string",
            "description": "币种"
          }
        },
        "required": [
          "rows"
        ]
      }
    },
    {
      "name": "finance.receivables",
      "access": "read",
      "title": "应收账款",
      "description": "按客户列出应收、账龄。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "description": "客户编号"
          },
          "overdue_only": {
            "type": "boolean",
            "description": "只看逾期"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "invoice_no": {
                  "type": "string",
                  "description": "发票号"
                },
                "customer": {
                  "type": "string",
                  "description": "客户"
                },
                "amount_due": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "due_date": {
                  "type": "string",
                  "description": "到期日",
                  "format": "date"
                },
                "days_overdue": {
                  "type": "integer",
                  "description": "逾期天数"
                }
              },
              "required": [
                "invoice_no",
                "amount_due"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "finance.create_journal",
      "access": "write",
      "title": "记一笔账",
      "description": "新建记账凭证（草稿）。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "日期",
            "format": "date"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "account": {
                  "type": "string",
                  "description": "科目编码"
                },
                "debit": {
                  "type": "number",
                  "description": "借方"
                },
                "credit": {
                  "type": "number",
                  "description": "贷方"
                },
                "memo": {
                  "type": "string",
                  "description": "摘要"
                }
              },
              "required": [
                "account"
              ]
            }
          },
          "memo": {
            "type": "string",
            "description": "说明"
          }
        },
        "required": [
          "date",
          "lines"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "hr.employees",
      "access": "read",
      "title": "员工名册",
      "description": "按部门、在职状态查员工（不返回身份证、银行卡、工资）。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "department": {
            "type": "string",
            "description": "部门"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "active",
              "on_leave",
              "terminated"
            ]
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "employee_id": {
                  "type": "string",
                  "description": "工号"
                },
                "name": {
                  "type": "string",
                  "description": "姓名"
                },
                "department": {
                  "type": "string",
                  "description": "部门"
                },
                "title": {
                  "type": "string",
                  "description": "职位"
                },
                "status": {
                  "type": "string",
                  "description": "状态"
                },
                "hired_at": {
                  "type": "string",
                  "description": "入职日期",
                  "format": "date"
                }
              },
              "required": [
                "employee_id",
                "name"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      },
      "notes": "工资、证件号等敏感字段不得返回；需要时单独做只给老板开放的工具。"
    },
    {
      "name": "hr.leave_requests",
      "access": "read",
      "title": "请假记录",
      "description": "查请假申请。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "string",
            "description": "工号"
          },
          "date_from": {
            "type": "string",
            "description": "起",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "description": "止",
            "format": "date"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "request_id": {
                  "type": "string",
                  "description": "编号"
                },
                "employee": {
                  "type": "string",
                  "description": "员工"
                },
                "type": {
                  "type": "string",
                  "description": "类型"
                },
                "from": {
                  "type": "string",
                  "description": "开始",
                  "format": "date"
                },
                "to": {
                  "type": "string",
                  "description": "结束",
                  "format": "date"
                },
                "status": {
                  "type": "string",
                  "description": "状态"
                }
              },
              "required": [
                "request_id"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "tickets.search",
      "access": "read",
      "title": "查询工单",
      "description": "按状态、优先级、处理人查工单。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "open",
              "pending",
              "resolved",
              "closed"
            ]
          },
          "priority": {
            "type": "string",
            "description": "优先级",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "assignee": {
            "type": "string",
            "description": "处理人"
          },
          "keyword": {
            "type": "string",
            "description": "关键词"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticket_id": {
                  "type": "string",
                  "description": "工单号"
                },
                "subject": {
                  "type": "string",
                  "description": "标题"
                },
                "status": {
                  "type": "string",
                  "description": "状态",
                  "enum": [
                    "open",
                    "pending",
                    "resolved",
                    "closed"
                  ]
                },
                "priority": {
                  "type": "string",
                  "description": "优先级",
                  "enum": [
                    "low",
                    "normal",
                    "high",
                    "urgent"
                  ]
                },
                "assignee": {
                  "type": "string",
                  "description": "处理人"
                },
                "created_at": {
                  "type": "string",
                  "description": "创建时间",
                  "format": "date-time"
                }
              },
              "required": [
                "ticket_id",
                "subject",
                "status"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "tickets.create",
      "access": "write",
      "title": "新建工单",
      "description": "建一张工单。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "description": "标题"
          },
          "description": {
            "type": "string",
            "description": "内容"
          },
          "priority": {
            "type": "string",
            "description": "优先级",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "customer_id": {
            "type": "string",
            "description": "关联客户"
          }
        },
        "required": [
          "subject"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          },
          "ticket_id": {
            "type": "string",
            "description": "工单号"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "tickets.reply",
      "access": "write",
      "title": "回复工单",
      "description": "在工单里回复客户或加内部备注。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "ticket_id": {
            "type": "string",
            "description": "工单号"
          },
          "body": {
            "type": "string",
            "description": "内容"
          },
          "internal": {
            "type": "boolean",
            "description": "内部备注，不发给客户"
          }
        },
        "required": [
          "ticket_id",
          "body"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "seo.keywords",
      "access": "read",
      "title": "关键词排名",
      "description": "关键词排名、搜索量、点击。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string",
            "description": "站点"
          },
          "keyword": {
            "type": "string",
            "description": "关键词"
          },
          "date_from": {
            "type": "string",
            "description": "起",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "description": "止",
            "format": "date"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "keyword": {
                  "type": "string",
                  "description": "关键词"
                },
                "position": {
                  "type": "number",
                  "description": "平均排名"
                },
                "clicks": {
                  "type": "integer",
                  "description": "点击"
                },
                "impressions": {
                  "type": "integer",
                  "description": "展示"
                },
                "url": {
                  "type": "string",
                  "description": "落地页"
                }
              },
              "required": [
                "keyword"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "seo.pages",
      "access": "read",
      "title": "页面表现",
      "description": "页面的流量、收录、问题。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string",
            "description": "站点"
          },
          "url_contains": {
            "type": "string",
            "description": "网址包含"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "description": "网址"
                },
                "clicks": {
                  "type": "integer",
                  "description": "点击"
                },
                "impressions": {
                  "type": "integer",
                  "description": "展示"
                },
                "indexed": {
                  "type": "boolean",
                  "description": "是否收录"
                },
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "问题"
                  }
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "ads.report",
      "access": "read",
      "title": "广告报表",
      "description": "按账户、广告系列、日期的花费和效果。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "account": {
            "type": "string",
            "description": "广告账户"
          },
          "campaign": {
            "type": "string",
            "description": "广告系列"
          },
          "date_from": {
            "type": "string",
            "description": "起",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "description": "止",
            "format": "date"
          },
          "group_by": {
            "type": "string",
            "description": "分组",
            "enum": [
              "day",
              "campaign",
              "ad_group",
              "keyword"
            ]
          }
        },
        "required": [
          "date_from",
          "date_to"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "分组值"
                },
                "spend": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "impressions": {
                  "type": "integer",
                  "description": "展示"
                },
                "clicks": {
                  "type": "integer",
                  "description": "点击"
                },
                "orders": {
                  "type": "integer",
                  "description": "订单"
                },
                "sales": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                },
                "acos": {
                  "type": "number",
                  "description": "ACoS / 花费占销售比"
                }
              }
            }
          }
        },
        "required": [
          "rows"
        ]
      }
    },
    {
      "name": "ads.update_budget",
      "access": "write",
      "title": "修改广告预算",
      "description": "改广告系列的日预算或暂停 / 启用。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string",
            "description": "广告系列编号"
          },
          "daily_budget": {
            "type": "object",
            "description": "金额",
            "properties": {
              "amount": {
                "type": "number",
                "description": "金额，十进制数"
              },
              "currency": {
                "type": "string",
                "description": "ISO 4217 币种，如 CNY、USD"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "enabled",
              "paused"
            ]
          }
        },
        "required": [
          "campaign_id"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "content.posts",
      "access": "read",
      "title": "查询文章",
      "description": "网站文章 / 页面列表。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "description": "关键词"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "draft",
              "published",
              "scheduled"
            ]
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "post_id": {
                  "type": "string",
                  "description": "编号"
                },
                "title": {
                  "type": "string",
                  "description": "标题"
                },
                "status": {
                  "type": "string",
                  "description": "状态"
                },
                "url": {
                  "type": "string",
                  "description": "网址"
                },
                "updated_at": {
                  "type": "string",
                  "description": "更新时间",
                  "format": "date-time"
                }
              },
              "required": [
                "post_id",
                "title"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "content.create_post",
      "access": "write",
      "title": "发文章",
      "description": "新建文章，可存草稿或发布。必须支持幂等键。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "标题"
          },
          "body": {
            "type": "string",
            "description": "正文（HTML 或 Markdown）"
          },
          "status": {
            "type": "string",
            "description": "状态",
            "enum": [
              "draft",
              "published"
            ]
          }
        },
        "required": [
          "title",
          "body"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          },
          "url": {
            "type": "string",
            "description": "网址"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "tasks.search",
      "access": "read",
      "title": "查询任务",
      "description": "项目任务。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project": {
            "type": "string",
            "description": "项目"
          },
          "assignee": {
            "type": "string",
            "description": "负责人"
          },
          "status": {
            "type": "string",
            "description": "状态"
          },
          "cursor": {
            "type": "string",
            "description": "上一页返回的 next_cursor；第一页不传"
          },
          "limit": {
            "type": "integer",
            "description": "每页条数，默认 20，最大 100",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "task_id": {
                  "type": "string",
                  "description": "编号"
                },
                "title": {
                  "type": "string",
                  "description": "标题"
                },
                "status": {
                  "type": "string",
                  "description": "状态"
                },
                "assignee": {
                  "type": "string",
                  "description": "负责人"
                },
                "due": {
                  "type": "string",
                  "description": "截止",
                  "format": "date"
                }
              },
              "required": [
                "task_id",
                "title"
              ]
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "下一页游标；没有更多时为 null",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "总条数（可选）"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      }
    },
    {
      "name": "tasks.create",
      "access": "write",
      "title": "新建任务",
      "description": "建一条任务。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "project": {
            "type": "string",
            "description": "项目"
          },
          "title": {
            "type": "string",
            "description": "标题"
          },
          "assignee": {
            "type": "string",
            "description": "负责人"
          },
          "due": {
            "type": "string",
            "description": "截止",
            "format": "date"
          }
        },
        "required": [
          "title"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "description": "是否成功"
          },
          "id": {
            "type": "string",
            "description": "被创建或修改的记录编号"
          },
          "message": {
            "type": "string",
            "description": "给人看的一句话结果"
          }
        },
        "required": [
          "ok"
        ]
      }
    },
    {
      "name": "reports.sales_summary",
      "access": "read",
      "title": "销售汇总",
      "description": "某段时间的订单数、销售额，可按渠道 / 店铺 / 商品分组。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "date_from": {
            "type": "string",
            "description": "起",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "description": "止",
            "format": "date"
          },
          "group_by": {
            "type": "string",
            "description": "分组",
            "enum": [
              "day",
              "month",
              "channel",
              "store",
              "sku"
            ]
          }
        },
        "required": [
          "date_from",
          "date_to"
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "分组值"
                },
                "orders": {
                  "type": "integer",
                  "description": "订单数"
                },
                "units": {
                  "type": "integer",
                  "description": "件数"
                },
                "sales": {
                  "type": "object",
                  "description": "金额",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "金额，十进制数"
                    },
                    "currency": {
                      "type": "string",
                      "description": "ISO 4217 币种，如 CNY、USD"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "rows"
        ]
      }
    }
  ]
}
