{
  "kind": "业务需求契约，不是可直接导入的服务器实现",
  "protocol_baseline": "MCP 2025-06-18",
  "synthetic": true,
  "tool": {
    "name": "query_order_status_demo",
    "description": "查询当前请求人获准组织内指定合成订单的状态；不支持写入。",
    "inputSchema": {
      "type": "object",
      "properties": {
        "order_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40,
          "pattern": "^ORDER_DEMO_[0-9]{2}$"
        }
      },
      "required": [
        "order_id"
      ],
      "additionalProperties": false
    },
    "outputSchema": {
      "type": "object",
      "properties": {
        "order_id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "closed"
          ]
        },
        "expected_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "updated_at": {
          "type": "string"
        },
        "source_ref": {
          "type": "string"
        }
      },
      "required": [
        "order_id",
        "status",
        "expected_date",
        "updated_at",
        "source_ref"
      ],
      "additionalProperties": false
    }
  },
  "server_side_context": [
    "verified_internal_user",
    "verified_tenant",
    "allowed_organization_scope"
  ],
  "error_contract": [
    {
      "code": "INVALID_INPUT",
      "retry": false
    },
    {
      "code": "NOT_ACCESSIBLE",
      "retry": false
    },
    {
      "code": "SOURCE_TIMEOUT",
      "retry": true
    },
    {
      "code": "SOURCE_SCHEMA_INVALID",
      "retry": false
    }
  ],
  "examples": [
    {
      "input": {
        "order_id": "ORDER_DEMO_01"
      },
      "identity": "user_demo_east",
      "expected": "返回东区订单限定字段"
    },
    {
      "input": {
        "order_id": "ORDER_DEMO_03"
      },
      "identity": "user_demo_east",
      "expected": "NOT_ACCESSIBLE且不返回订单详情"
    },
    {
      "input": {
        "order_id": "任意SQL文本"
      },
      "identity": "user_demo_east",
      "expected": "INVALID_INPUT且不访问来源"
    }
  ],
  "acceptance": [
    "拒绝客户端伪造tenant_id",
    "来源超时不编造状态",
    "日志不含真实令牌",
    "新增写工具必须另行授权与人工确认"
  ]
}
