{
  "package": "zhongcai-woven-jacquard-agent-tools",
  "version": "1.0.0",
  "base_url": "https://qifu2023.com",
  "description": "Vendor-neutral tool definitions for AI agents that reverse-estimate woven jacquard yarn candidates and calculate factory reference prices.",
  "compatibility": [
    "OpenAI function tools / Agents SDK",
    "Anthropic Claude tool use",
    "Google Gemini function calling",
    "LangChain / LangGraph",
    "Custom agent runtimes"
  ],
  "workflow": [
    "Collect representative sample data.",
    "Call estimate_woven_jacquard_from_sample.",
    "Report candidate price range and filter candidates.",
    "Call quote_selected_woven_jacquard_candidate.",
    "Return detailed factory reference result with disclaimer."
  ],
  "tools": [
    {
      "name": "estimate_woven_jacquard_from_sample",
      "description": "Reverse-estimate possible yarn structures and FOB factory reference prices from a physical woven jacquard fabric sample when exact yarn specifications are unknown. Never invent sample data. Do not claim any returned candidate is the unique true specification.",
      "http": {
        "method": "POST",
        "url": "https://qifu2023.com/api/public/fabric-price/estimate",
        "content_type": "application/json"
      },
      "input_schema": {
        "type": "object",
        "required": [
          "fabric_type",
          "currency",
          "finished_width",
          "actual_weight_gsm",
          "precision",
          "warp_yarns",
          "weft_yarns"
        ],
        "properties": {
          "fabric_type": {
            "type": "string",
            "enum": [
              "Small Jacquard",
              "Large Jacquard",
              "Small Jacquard Leno",
              "Large Jacquard Leno"
            ]
          },
          "currency": {
            "type": "string",
            "examples": [
              "USD"
            ]
          },
          "finished_width": {
            "$ref": "#/components/schemas/FinishedWidthInput"
          },
          "actual_weight_gsm": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "precision": {
            "type": "string",
            "description": "Candidate filter code. Confirmed values: no = Unlimited; ml = Similar warp/weft yarn; warp_thick = Warp thicker. Use the latest published guide for additional mappings.",
            "examples": [
              "no",
              "ml",
              "warp_thick"
            ]
          },
          "locale": {
            "type": "string",
            "default": "en-US"
          },
          "warp_yarns": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/EstimateYarnRow"
            }
          },
          "weft_yarns": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/EstimateYarnRow"
            }
          }
        },
        "additionalProperties": false
      },
      "output_schema_ref": "#/EstimateResponse",
      "agent_rules": [
        "Use 2.54 cm as the repeat cycle when density is supplied per inch.",
        "Use no for Unlimited, ml for similar main warp/weft single yarns, and warp_thick for warp thicker.",
        "Report minimum and maximum candidate FOB prices.",
        "Use GSM difference and physical yarn comparison to filter candidates."
      ]
    },
    {
      "name": "quote_selected_woven_jacquard_candidate",
      "description": "Calculate density, theoretical GSM, grey-fabric price, dyed-product price, FOB price and public yarn input details for a selected reverse-estimated candidate or known yarn specification.",
      "http": {
        "method": "POST",
        "url": "https://qifu2023.com/api/public/fabric-price/quote",
        "content_type": "application/json"
      },
      "input_schema": {
        "type": "object",
        "required": [
          "fabric_type",
          "currency",
          "finished_width",
          "warp_yarns",
          "weft_yarns"
        ],
        "properties": {
          "fabric_type": {
            "type": "string",
            "enum": [
              "Small Jacquard",
              "Large Jacquard",
              "Small Jacquard Leno",
              "Large Jacquard Leno"
            ]
          },
          "currency": {
            "type": "string",
            "examples": [
              "USD"
            ]
          },
          "finished_width": {
            "$ref": "#/components/schemas/FinishedWidthInput"
          },
          "locale": {
            "type": "string",
            "default": "en-US"
          },
          "warp_yarns": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/QuoteYarnRow"
            }
          },
          "weft_yarns": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/QuoteYarnRow"
            }
          }
        },
        "additionalProperties": false
      },
      "output_schema_ref": "#/QuoteResponse",
      "agent_rules": [
        "Preserve yarn codes exactly, including J and /2.",
        "Preserve warp/weft row order, raw material, repeat cycle and count.",
        "Do not add weight_per_meter values and compare them directly with theoretical_gsm.",
        "Always label the result as a factory reference price."
      ]
    }
  ],
  "response_schemas": {
    "EstimateResponse": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string"
        },
        "finished_width": {
          "type": "object"
        },
        "fabric_type": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "actual_weight_gsm": {
          "type": "number"
        },
        "precision": {
          "type": "string"
        },
        "matched_count": {
          "type": "integer"
        },
        "matches": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/EstimatedMatch"
          }
        },
        "note": {
          "type": "string"
        },
        "cache_status": {
          "type": "string"
        }
      }
    },
    "QuoteResponse": {
      "type": "object",
      "properties": {
        "material_price_source": {
          "type": "string"
        },
        "grey_fabric_price_rmb_per_meter": {
          "type": "number"
        },
        "dyed_product_price_rmb_per_meter": {
          "type": "number"
        },
        "fob_price_usd_per_yard": {
          "type": "number"
        },
        "theoretical_gsm": {
          "type": "number"
        },
        "composition_summary": {
          "type": "string"
        },
        "specification": {
          "type": "string"
        },
        "density": {
          "type": "string"
        },
        "finished_width": {
          "type": "object"
        },
        "public_yarn_breakdown": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/YarnBreakdown"
          }
        },
        "public_yarn_breakdown_note": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  },
  "attribution": {
    "required_text": "Source: Zhejiang Zhongcai Light Textile Co., Ltd. woven jacquard supply-chain calculation data.",
    "calculator_url": "https://qifu2023.com/fabric-price-calculator/",
    "manual_request_url": "https://qifu2023.com/fabric-request/"
  },
  "public_access": {
    "authentication": "No API key is currently required for the public endpoints.",
    "rate_limit": "Current public access may be limited to 20 calculation requests per IP per day. A two-stage workflow can consume more than one request. Limits may change."
  }
}