{
  "openapi": "3.1.0",
  "info": {
    "title": "SourceSquid sourcing tools API",
    "version": "1.0.0",
    "summary": "Free calculators for importers: landed cost, AQL sampling, CBM, US HTS search, EOQ, safety stock, Incoterms 2020 and India manufacturing clusters.",
    "description": "JSON endpoints behind the free tools at https://sourcesquid.co/tools/. No key needed. Every response echoes the inputs and includes the method used and a \"source\" URL to cite. The same tools are available to AI assistants over the Model Context Protocol at https://sourcesquid.co/mcp (Streamable HTTP). Results are estimates for planning; confirm duty rates and codes with a customs broker. Please keep automated use reasonable; heavy traffic is rate limited.",
    "contact": {
      "name": "SourceSquid",
      "email": "anirudh@sourcesquid.co",
      "url": "https://sourcesquid.co"
    },
    "termsOfService": "https://sourcesquid.co/"
  },
  "servers": [
    {
      "url": "https://sourcesquid.co"
    }
  ],
  "externalDocs": {
    "description": "Plain-text site guide for AI assistants",
    "url": "https://sourcesquid.co/llms.txt"
  },
  "tags": [
    {
      "name": "Tools",
      "description": "Sourcing, quality, logistics and planning calculators"
    }
  ],
  "paths": {
    "/api/tools/landed-cost": {
      "get": {
        "operationId": "landed_cost_get",
        "summary": "Landed cost calculator (EU, UK, US)",
        "description": "Landed cost per unit for goods imported into the EU, UK or US: goods, origin charges, freight, insurance, import duty, US MPF/HMF fees, destination charges and (optionally) import VAT. EU/UK duty is charged on the CIF customs value and VAT on customs value plus duty; US duty on the transaction (FOB) value. All amounts in USD.",
        "parameters": [
          {
            "name": "dest",
            "in": "query",
            "required": false,
            "description": "Destination market",
            "schema": {
              "type": "string",
              "enum": [
                "eu",
                "uk",
                "us"
              ],
              "default": "eu"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "description": "Price per unit, USD",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 4.2
            }
          },
          {
            "name": "qty",
            "in": "query",
            "required": false,
            "description": "Units in the shipment",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 5000
            }
          },
          {
            "name": "term",
            "in": "query",
            "required": false,
            "description": "How the price is quoted",
            "schema": {
              "type": "string",
              "enum": [
                "exw",
                "fob",
                "cif"
              ],
              "default": "fob"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "Origin charges in USD (EXW only: pickup, export clearance, origin handling)",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "description": "Transport mode (sea adds the US Harbor Maintenance Fee)",
            "schema": {
              "type": "string",
              "enum": [
                "sea",
                "air"
              ],
              "default": "sea"
            }
          },
          {
            "name": "freight",
            "in": "query",
            "required": false,
            "description": "Freight for the whole shipment, USD (ignored for CIF)",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 2600
            }
          },
          {
            "name": "ins",
            "in": "query",
            "required": false,
            "description": "Cargo insurance, % of value (ignored for CIF)",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 0.3
            }
          },
          {
            "name": "dest_ch",
            "in": "query",
            "required": false,
            "description": "Destination charges, USD: terminal handling, customs broker, delivery",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 650
            }
          },
          {
            "name": "duty",
            "in": "query",
            "required": false,
            "description": "Import duty rate, % (find it with hs-search)",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 3.7
            }
          },
          {
            "name": "extra",
            "in": "query",
            "required": false,
            "description": "US only: additional Chapter 99 tariffs, %",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "vat",
            "in": "query",
            "required": false,
            "description": "EU/UK import VAT rate, % (default 21 EU, 20 UK)",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "vatin",
            "in": "query",
            "required": false,
            "description": "Include import VAT in the landed cost (true if you cannot reclaim VAT)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/landed_cost_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "landed_cost",
        "summary": "Landed cost calculator (EU, UK, US)",
        "description": "Landed cost per unit for goods imported into the EU, UK or US: goods, origin charges, freight, insurance, import duty, US MPF/HMF fees, destination charges and (optionally) import VAT. EU/UK duty is charged on the CIF customs value and VAT on customs value plus duty; US duty on the transaction (FOB) value. All amounts in USD.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/landed_cost_input"
              }
            }
          }
        },
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/landed_cost_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/aql": {
      "get": {
        "operationId": "aql_sampling_plan_get",
        "summary": "AQL sampling plan (ANSI/ASQ Z1.4, ISO 2859-1)",
        "description": "Single sampling plan from ANSI/ASQ Z1.4 (ISO 2859-1): sample size code letter, units to check, and accept/reject numbers (Ac/Re) for critical, major and minor defects at normal, tightened or reduced inspection, with the arrow rule applied. Example: lot 3,500, level II, normal: code L, 200 units, AQL 2.5 Ac 10 Re 11, AQL 4.0 Ac 14 Re 15.",
        "parameters": [
          {
            "name": "lot",
            "in": "query",
            "required": true,
            "description": "Lot size in units (whole order or batch being inspected)",
            "schema": {
              "type": "integer",
              "minimum": 2
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "description": "Inspection level",
            "schema": {
              "type": "string",
              "enum": [
                "I",
                "II",
                "III",
                "S1",
                "S2",
                "S3",
                "S4"
              ],
              "default": "II"
            }
          },
          {
            "name": "sev",
            "in": "query",
            "required": false,
            "description": "Inspection severity",
            "schema": {
              "type": "string",
              "enum": [
                "normal",
                "tightened",
                "reduced"
              ],
              "default": "normal"
            }
          },
          {
            "name": "crit",
            "in": "query",
            "required": false,
            "description": "AQL for critical defects; \"0\" means zero tolerance",
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "0.010",
                "0.015",
                "0.025",
                "0.040",
                "0.065",
                "0.10",
                "0.15",
                "0.25",
                "0.40",
                "0.65",
                "1.0",
                "1.5",
                "2.5",
                "4.0",
                "6.5",
                "10"
              ],
              "default": "0"
            }
          },
          {
            "name": "major",
            "in": "query",
            "required": false,
            "description": "AQL for major defects",
            "schema": {
              "type": "string",
              "enum": [
                "0.010",
                "0.015",
                "0.025",
                "0.040",
                "0.065",
                "0.10",
                "0.15",
                "0.25",
                "0.40",
                "0.65",
                "1.0",
                "1.5",
                "2.5",
                "4.0",
                "6.5",
                "10"
              ],
              "default": "2.5"
            }
          },
          {
            "name": "minor",
            "in": "query",
            "required": false,
            "description": "AQL for minor defects",
            "schema": {
              "type": "string",
              "enum": [
                "0.010",
                "0.015",
                "0.025",
                "0.040",
                "0.065",
                "0.10",
                "0.15",
                "0.25",
                "0.40",
                "0.65",
                "1.0",
                "1.5",
                "2.5",
                "4.0",
                "6.5",
                "10"
              ],
              "default": "4.0"
            }
          },
          {
            "name": "aql",
            "in": "query",
            "required": false,
            "description": "Optional single AQL; when given, only this plan is returned",
            "schema": {
              "type": "string",
              "enum": [
                "0.010",
                "0.015",
                "0.025",
                "0.040",
                "0.065",
                "0.10",
                "0.15",
                "0.25",
                "0.40",
                "0.65",
                "1.0",
                "1.5",
                "2.5",
                "4.0",
                "6.5",
                "10"
              ]
            }
          }
        ],
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/aql_sampling_plan_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "aql_sampling_plan",
        "summary": "AQL sampling plan (ANSI/ASQ Z1.4, ISO 2859-1)",
        "description": "Single sampling plan from ANSI/ASQ Z1.4 (ISO 2859-1): sample size code letter, units to check, and accept/reject numbers (Ac/Re) for critical, major and minor defects at normal, tightened or reduced inspection, with the arrow rule applied. Example: lot 3,500, level II, normal: code L, 200 units, AQL 2.5 Ac 10 Re 11, AQL 4.0 Ac 14 Re 15.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/aql_sampling_plan_input"
              }
            }
          }
        },
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/aql_sampling_plan_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/cbm": {
      "get": {
        "operationId": "cbm_chargeable_weight_get",
        "summary": "CBM and chargeable weight",
        "description": "Shipment volume in cubic metres from carton dimensions, plus air chargeable weight (1:6000), courier chargeable weight (1:5000), sea LCL revenue tons (W/M) and the share of a 20ft, 40ft and 40ft HC container. For GET, use l1,w1,h1,q1,g1 (and l2,w2… for more lines), or a single l,w,h,qty,kg.",
        "parameters": [
          {
            "name": "du",
            "in": "query",
            "required": false,
            "description": "Dimension unit",
            "schema": {
              "type": "string",
              "enum": [
                "cm",
                "in"
              ],
              "default": "cm"
            }
          },
          {
            "name": "wu",
            "in": "query",
            "required": false,
            "description": "Weight unit",
            "schema": {
              "type": "string",
              "enum": [
                "kg",
                "lb"
              ],
              "default": "kg"
            }
          }
        ],
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cbm_chargeable_weight_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "cbm_chargeable_weight",
        "summary": "CBM and chargeable weight",
        "description": "Shipment volume in cubic metres from carton dimensions, plus air chargeable weight (1:6000), courier chargeable weight (1:5000), sea LCL revenue tons (W/M) and the share of a 20ft, 40ft and 40ft HC container.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cbm_chargeable_weight_input"
              }
            }
          }
        },
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cbm_chargeable_weight_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/hs-search": {
      "get": {
        "operationId": "hs_code_search_get",
        "summary": "US HTS code search",
        "description": "Search the 2026 US Harmonized Tariff Schedule (Revision 22, 11,414 lines) by product words or code digits. Returns the top matches with the US general (column 1) duty rate. Chapter 99 additional duties (Section 301, Section 232, reciprocal tariffs) are not included. The first six digits are shared with EU and UK codes; their rates differ.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Product words (e.g. \"stainless steel bottle\", \"cotton t-shirt\") and/or code digits (e.g. \"8471\" or \"6109.10\")",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "chapter",
            "in": "query",
            "required": false,
            "description": "Optional two-digit chapter filter, e.g. \"61\"",
            "schema": {
              "type": "string",
              "pattern": "^\\d{2}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 10
            }
          }
        ],
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/hs_code_search_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "hs_code_search",
        "summary": "US HTS code search",
        "description": "Search the 2026 US Harmonized Tariff Schedule (Revision 22, 11,414 lines) by product words or code digits. Returns the top matches with the US general (column 1) duty rate. Chapter 99 additional duties (Section 301, Section 232, reciprocal tariffs) are not included. The first six digits are shared with EU and UK codes; their rates differ.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/hs_code_search_input"
              }
            }
          }
        },
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/hs_code_search_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/eoq": {
      "get": {
        "operationId": "economic_order_quantity_get",
        "summary": "Economic order quantity (EOQ)",
        "description": "Economic order quantity with orders per year, days between orders, yearly ordering and holding cost, the range of order sizes within 5% of the lowest cost, and a comparison with your current order size.",
        "parameters": [
          {
            "name": "d",
            "in": "query",
            "required": true,
            "description": "Annual demand, units per year",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          },
          {
            "name": "s",
            "in": "query",
            "required": true,
            "description": "Cost per order placed (buyer time, inspection, freight booking)",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          },
          {
            "name": "c",
            "in": "query",
            "required": false,
            "description": "Landed unit cost (needed when hm = pct)",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 8.5
            }
          },
          {
            "name": "hm",
            "in": "query",
            "required": false,
            "description": "Holding cost given as % of unit cost per year (pct) or an amount per unit per year (abs)",
            "schema": {
              "type": "string",
              "enum": [
                "pct",
                "abs"
              ],
              "default": "pct"
            }
          },
          {
            "name": "h",
            "in": "query",
            "required": false,
            "description": "Holding cost: % per year (hm=pct) or amount per unit per year (hm=abs)",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0,
              "default": 25
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Optional: your current order quantity, to compare",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "cur",
            "in": "query",
            "required": false,
            "description": "Currency label for the result",
            "schema": {
              "type": "string",
              "enum": [
                "USD",
                "EUR",
                "GBP",
                "AUD"
              ],
              "default": "USD"
            }
          }
        ],
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/economic_order_quantity_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "economic_order_quantity",
        "summary": "Economic order quantity (EOQ)",
        "description": "Economic order quantity with orders per year, days between orders, yearly ordering and holding cost, the range of order sizes within 5% of the lowest cost, and a comparison with your current order size.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/economic_order_quantity_input"
              }
            }
          }
        },
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/economic_order_quantity_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/safety-stock": {
      "get": {
        "operationId": "safety_stock_get",
        "summary": "Safety stock and reorder point",
        "description": "Safety stock covering both demand and lead-time variation, z × √(LT·σd² + d²·σLT²), with the reorder point and a table across service levels.",
        "parameters": [
          {
            "name": "sl",
            "in": "query",
            "required": false,
            "description": "Cycle service level, %",
            "schema": {
              "type": "string",
              "enum": [
                "80",
                "85",
                "90",
                "95",
                "97.5",
                "98",
                "99",
                "99.5",
                "99.9"
              ],
              "default": "95"
            }
          },
          {
            "name": "d",
            "in": "query",
            "required": true,
            "description": "Average daily demand, units",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "sd",
            "in": "query",
            "required": true,
            "description": "Standard deviation of daily demand, units",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "lt",
            "in": "query",
            "required": true,
            "description": "Average lead time, days (order to stock ready to sell)",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "slt",
            "in": "query",
            "required": false,
            "description": "Standard deviation of lead time, days",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "c",
            "in": "query",
            "required": false,
            "description": "Landed unit cost, to value the buffer",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "cur",
            "in": "query",
            "required": false,
            "description": "Currency label for the result",
            "schema": {
              "type": "string",
              "enum": [
                "USD",
                "EUR",
                "GBP",
                "AUD"
              ],
              "default": "USD"
            }
          }
        ],
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/safety_stock_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "safety_stock",
        "summary": "Safety stock and reorder point",
        "description": "Safety stock covering both demand and lead-time variation, z × √(LT·σd² + d²·σLT²), with the reorder point and a table across service levels.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/safety_stock_input"
              }
            }
          }
        },
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/safety_stock_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/incoterms": {
      "get": {
        "operationId": "incoterms_2020_get",
        "summary": "Incoterms 2020 advisor",
        "description": "Incoterms® 2020 responsibilities (export clearance, loading, main carriage, insurance, risk transfer, unloading, import clearance). Either look up one rule (rule=FOB), list all 11 (all=true), or answer five questions (mode, frt, exp, imp, risk) to get the best-fitting rule with the reason and how to write it on a PO.",
        "parameters": [
          {
            "name": "rule",
            "in": "query",
            "required": false,
            "description": "Look up one rule",
            "schema": {
              "type": "string",
              "enum": [
                "EXW",
                "FCA",
                "CPT",
                "CIP",
                "DAP",
                "DPU",
                "DDP",
                "FAS",
                "FOB",
                "CFR",
                "CIF"
              ]
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "description": "Return all 11 rules",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "description": "How the goods travel: cont (sea containers), bulk (sea bulk or break-bulk), air, road (road or rail), multi (more than one mode)",
            "schema": {
              "type": "string",
              "enum": [
                "cont",
                "bulk",
                "air",
                "road",
                "multi"
              ],
              "default": "cont"
            }
          },
          {
            "name": "frt",
            "in": "query",
            "required": false,
            "description": "Who books the main freight: B buyer, S seller, SI seller with insurance",
            "schema": {
              "type": "string",
              "enum": [
                "B",
                "S",
                "SI"
              ],
              "default": "B"
            }
          },
          {
            "name": "exp",
            "in": "query",
            "required": false,
            "description": "Who clears export: S seller, B buyer",
            "schema": {
              "type": "string",
              "enum": [
                "S",
                "B"
              ],
              "default": "S"
            }
          },
          {
            "name": "imp",
            "in": "query",
            "required": false,
            "description": "Who clears import and pays duties: B buyer, S seller",
            "schema": {
              "type": "string",
              "enum": [
                "B",
                "S"
              ],
              "default": "B"
            }
          },
          {
            "name": "risk",
            "in": "query",
            "required": false,
            "description": "Where risk should pass: prem (seller's premises), orig (at origin, when handed over), dest (destination, before unloading), destU (after unloading)",
            "schema": {
              "type": "string",
              "enum": [
                "prem",
                "orig",
                "dest",
                "destU"
              ],
              "default": "orig"
            }
          }
        ],
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/incoterms_2020_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "incoterms_2020",
        "summary": "Incoterms 2020 advisor",
        "description": "Incoterms® 2020 responsibilities (export clearance, loading, main carriage, insurance, risk transfer, unloading, import clearance). Either look up one rule (rule=FOB), list all 11 (all=true), or answer five questions (mode, frt, exp, imp, risk) to get the best-fitting rule with the reason and how to write it on a PO.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/incoterms_2020_input"
              }
            }
          }
        },
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/incoterms_2020_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/india-clusters": {
      "get": {
        "operationId": "india_cluster_finder_get",
        "summary": "India manufacturing cluster finder",
        "description": "Ranked Indian manufacturing clusters (city, state, what it is known for, process families, languages, nearest seaport) for a product family, material, process or search word, from the SourceSquid India Sourcing Atlas (87 clusters). Returns clusters, not individual factories.",
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "required": false,
            "description": "Atlas product family slug",
            "schema": {
              "type": "string",
              "enum": [
                "investment-castings",
                "aluminium-extrusion-profiles",
                "machined-welded-assemblies",
                "tube-bending-welded-frames",
                "injection-moulded-plastic-parts",
                "fibc-jumbo-bags",
                "cargo-nets-webbing-straps",
                "filter-bags-anti-static-pouches",
                "electronics-pcb-assemblies",
                "automotive-seat-covers-trim",
                "plastic-pallets-returnable-packaging",
                "brass-metal-home-decor",
                "knitwear-t-shirts",
                "home-textiles-towels-rugs",
                "leather-goods-footwear",
                "closed-die-forgings-flanges",
                "fasteners",
                "hand-tools",
                "machined-auto-components",
                "pump-valve-components",
                "sheet-metal-enclosures",
                "wire-harnesses-cables",
                "brass-hardware-fittings",
                "iron-sand-castings",
                "aluminium-zinc-die-castings",
                "ceramic-tableware-tiles",
                "decor-lighting",
                "marble-stone-decor",
                "wooden-cane-furniture",
                "wooden-handicrafts-toys",
                "hand-knotted-tufted-rugs",
                "bed-kitchen-linen",
                "denim-woven-fabrics",
                "woven-garments",
                "handloom-block-printed-textiles",
                "jute-cotton-bags",
                "leather-bags-accessories",
                "sports-goods",
                "silver-fashion-jewellery",
                "printed-packaging-stationery",
                "leather-saddlery-equestrian",
                "organic-coconut-products",
                "wooden-kitchenware-serveware",
                "yoga-meditation-cushions",
                "cast-iron-fitness-equipment",
                "leather-aprons-workwear",
                "handmade-stoneware-ceramic-decor",
                "areca-bagasse-tableware"
              ]
            }
          },
          {
            "name": "material",
            "in": "query",
            "required": false,
            "description": "Atlas material slug",
            "schema": {
              "type": "string",
              "enum": [
                "carbon-steel",
                "stainless-steel",
                "cast-iron",
                "aluminium",
                "brass-and-copper",
                "zinc-alloy",
                "engineering-plastics",
                "polypropylene-polyethylene",
                "rubber",
                "cotton",
                "polyester-synthetics",
                "wool",
                "silk",
                "jute-and-natural-fibres",
                "leather",
                "wood-bamboo-and-cane",
                "glass",
                "ceramics-stoneware",
                "natural-stone-marble",
                "paper-board",
                "coconut",
                "agri-residue-fibres"
              ]
            }
          },
          {
            "name": "process",
            "in": "query",
            "required": false,
            "description": "Process family code or slug",
            "schema": {
              "type": "string",
              "enum": [
                "CAST",
                "FORG",
                "MACH",
                "SHEET",
                "TUBE",
                "PLAS",
                "ELEC",
                "AUTO",
                "WEAVE",
                "KNIT",
                "GARM",
                "HOME",
                "PRINT",
                "LEATH",
                "WOOD",
                "CERA",
                "STONE",
                "METAL",
                "JEWEL",
                "CHEM",
                "FOOD",
                "SPORT",
                "TOOL",
                "FIBRE",
                "PACK",
                "casting-and-foundry",
                "forging",
                "machining-and-precision",
                "sheet-metal-and-fabrication",
                "tube-extrusion-and-wire",
                "plastics-and-rubber-moulding",
                "electronics-and-assembly",
                "auto-and-ev-components",
                "weaving-and-handloom",
                "knitting-and-knitwear",
                "garments-and-cut-make-trim",
                "home-textiles-and-carpets",
                "dyeing-printing-and-embroidery",
                "leather-and-footwear",
                "wood-cane-and-furniture",
                "ceramics-and-glass",
                "stone-and-marble",
                "metalware-and-brass",
                "gems-and-jewellery",
                "chemicals-and-pharma",
                "food-spices-and-agri",
                "sports-goods-and-toys",
                "hand-tools-and-hardware",
                "natural-fibres-jute-coir-bamboo",
                "printing-and-packaging"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search words, e.g. \"towels\", \"brass\", \"Tamil Nadu\", \"bicycles\"",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of clusters to return",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 30,
              "default": 8
            }
          }
        ],
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/india_cluster_finder_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "india_cluster_finder",
        "summary": "India manufacturing cluster finder",
        "description": "Ranked Indian manufacturing clusters (city, state, what it is known for, process families, languages, nearest seaport) for a product family, material, process or search word, from the SourceSquid India Sourcing Atlas (87 clusters). Returns clusters, not individual factories.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/india_cluster_finder_input"
              }
            }
          }
        },
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/india_cluster_finder_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input: the message says what to change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/index": {
      "get": {
        "operationId": "list_tools",
        "summary": "List the tools with their input schemas",
        "tags": [
          "Tools"
        ],
        "responses": {
          "200": {
            "description": "Tool list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "tool": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "input_schema": {
            "type": "object"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "error"
        ]
      },
      "landed_cost_input": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "dest": {
            "type": "string",
            "description": "Destination market",
            "enum": [
              "eu",
              "uk",
              "us"
            ],
            "default": "eu"
          },
          "price": {
            "type": "number",
            "description": "Price per unit, USD",
            "minimum": 0,
            "default": 4.2
          },
          "qty": {
            "type": "integer",
            "description": "Units in the shipment",
            "minimum": 1,
            "default": 5000
          },
          "term": {
            "type": "string",
            "description": "How the price is quoted",
            "enum": [
              "exw",
              "fob",
              "cif"
            ],
            "default": "fob"
          },
          "origin": {
            "type": "number",
            "description": "Origin charges in USD (EXW only: pickup, export clearance, origin handling)",
            "minimum": 0,
            "default": 0
          },
          "mode": {
            "type": "string",
            "description": "Transport mode (sea adds the US Harbor Maintenance Fee)",
            "enum": [
              "sea",
              "air"
            ],
            "default": "sea"
          },
          "freight": {
            "type": "number",
            "description": "Freight for the whole shipment, USD (ignored for CIF)",
            "minimum": 0,
            "default": 2600
          },
          "ins": {
            "type": "number",
            "description": "Cargo insurance, % of value (ignored for CIF)",
            "minimum": 0,
            "default": 0.3
          },
          "dest_ch": {
            "type": "number",
            "description": "Destination charges, USD: terminal handling, customs broker, delivery",
            "minimum": 0,
            "default": 650
          },
          "duty": {
            "type": "number",
            "description": "Import duty rate, % (find it with hs-search)",
            "minimum": 0,
            "default": 3.7
          },
          "extra": {
            "type": "number",
            "description": "US only: additional Chapter 99 tariffs, %",
            "minimum": 0,
            "default": 0
          },
          "vat": {
            "type": "number",
            "description": "EU/UK import VAT rate, % (default 21 EU, 20 UK)",
            "minimum": 0
          },
          "vatin": {
            "type": "boolean",
            "description": "Include import VAT in the landed cost (true if you cannot reclaim VAT)",
            "default": false
          }
        }
      },
      "landed_cost_response": {
        "type": "object",
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "const": "landed-cost"
          },
          "inputs": {
            "type": "object",
            "description": "The inputs used, after defaults and normalisation"
          },
          "result": {
            "type": "object",
            "description": "The calculation result"
          },
          "method": {
            "type": "string",
            "description": "Formula, standard or data source used"
          },
          "source": {
            "type": "string",
            "format": "uri",
            "const": "https://sourcesquid.co/tools/landed-cost/",
            "description": "Cite this page when quoting the result"
          }
        }
      },
      "aql_sampling_plan_input": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "lot"
        ],
        "properties": {
          "lot": {
            "type": "integer",
            "description": "Lot size in units (whole order or batch being inspected)",
            "minimum": 2
          },
          "level": {
            "type": "string",
            "description": "Inspection level",
            "enum": [
              "I",
              "II",
              "III",
              "S1",
              "S2",
              "S3",
              "S4"
            ],
            "default": "II"
          },
          "sev": {
            "type": "string",
            "description": "Inspection severity",
            "enum": [
              "normal",
              "tightened",
              "reduced"
            ],
            "default": "normal"
          },
          "crit": {
            "type": "string",
            "description": "AQL for critical defects; \"0\" means zero tolerance",
            "enum": [
              "0",
              "0.010",
              "0.015",
              "0.025",
              "0.040",
              "0.065",
              "0.10",
              "0.15",
              "0.25",
              "0.40",
              "0.65",
              "1.0",
              "1.5",
              "2.5",
              "4.0",
              "6.5",
              "10"
            ],
            "default": "0"
          },
          "major": {
            "type": "string",
            "description": "AQL for major defects",
            "enum": [
              "0.010",
              "0.015",
              "0.025",
              "0.040",
              "0.065",
              "0.10",
              "0.15",
              "0.25",
              "0.40",
              "0.65",
              "1.0",
              "1.5",
              "2.5",
              "4.0",
              "6.5",
              "10"
            ],
            "default": "2.5"
          },
          "minor": {
            "type": "string",
            "description": "AQL for minor defects",
            "enum": [
              "0.010",
              "0.015",
              "0.025",
              "0.040",
              "0.065",
              "0.10",
              "0.15",
              "0.25",
              "0.40",
              "0.65",
              "1.0",
              "1.5",
              "2.5",
              "4.0",
              "6.5",
              "10"
            ],
            "default": "4.0"
          },
          "aql": {
            "type": "string",
            "description": "Optional single AQL; when given, only this plan is returned",
            "enum": [
              "0.010",
              "0.015",
              "0.025",
              "0.040",
              "0.065",
              "0.10",
              "0.15",
              "0.25",
              "0.40",
              "0.65",
              "1.0",
              "1.5",
              "2.5",
              "4.0",
              "6.5",
              "10"
            ]
          }
        }
      },
      "aql_sampling_plan_response": {
        "type": "object",
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "const": "aql"
          },
          "inputs": {
            "type": "object",
            "description": "The inputs used, after defaults and normalisation"
          },
          "result": {
            "type": "object",
            "description": "The calculation result"
          },
          "method": {
            "type": "string",
            "description": "Formula, standard or data source used"
          },
          "source": {
            "type": "string",
            "format": "uri",
            "const": "https://sourcesquid.co/tools/aql-sampling-planner/",
            "description": "Cite this page when quoting the result"
          }
        }
      },
      "cbm_chargeable_weight_input": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cartons": {
            "type": "array",
            "maxItems": 50,
            "description": "Carton lines",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "l",
                "w",
                "h",
                "qty"
              ],
              "properties": {
                "l": {
                  "type": "number",
                  "description": "Length per carton",
                  "minimum": 0
                },
                "w": {
                  "type": "number",
                  "description": "Width per carton",
                  "minimum": 0
                },
                "h": {
                  "type": "number",
                  "description": "Height per carton",
                  "minimum": 0
                },
                "qty": {
                  "type": "integer",
                  "description": "Number of cartons",
                  "minimum": 0
                },
                "kg": {
                  "type": "number",
                  "description": "Gross weight per carton (in wu units)",
                  "minimum": 0,
                  "default": 0
                }
              }
            }
          },
          "du": {
            "type": "string",
            "description": "Dimension unit",
            "enum": [
              "cm",
              "in"
            ],
            "default": "cm"
          },
          "wu": {
            "type": "string",
            "description": "Weight unit",
            "enum": [
              "kg",
              "lb"
            ],
            "default": "kg"
          }
        }
      },
      "cbm_chargeable_weight_response": {
        "type": "object",
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "const": "cbm"
          },
          "inputs": {
            "type": "object",
            "description": "The inputs used, after defaults and normalisation"
          },
          "result": {
            "type": "object",
            "description": "The calculation result"
          },
          "method": {
            "type": "string",
            "description": "Formula, standard or data source used"
          },
          "source": {
            "type": "string",
            "format": "uri",
            "const": "https://sourcesquid.co/tools/cbm/",
            "description": "Cite this page when quoting the result"
          }
        }
      },
      "hs_code_search_input": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "q": {
            "type": "string",
            "description": "Product words (e.g. \"stainless steel bottle\", \"cotton t-shirt\") and/or code digits (e.g. \"8471\" or \"6109.10\")",
            "maxLength": 200
          },
          "chapter": {
            "type": "string",
            "description": "Optional two-digit chapter filter, e.g. \"61\"",
            "pattern": "^\\d{2}$"
          },
          "limit": {
            "type": "integer",
            "description": "Number of results",
            "minimum": 1,
            "maximum": 25,
            "default": 10
          }
        }
      },
      "hs_code_search_response": {
        "type": "object",
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "const": "hs-search"
          },
          "inputs": {
            "type": "object",
            "description": "The inputs used, after defaults and normalisation"
          },
          "result": {
            "type": "object",
            "description": "The calculation result"
          },
          "method": {
            "type": "string",
            "description": "Formula, standard or data source used"
          },
          "chapter_99_note": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "format": "uri",
            "const": "https://sourcesquid.co/tools/hs-code-finder/",
            "description": "Cite this page when quoting the result"
          }
        }
      },
      "economic_order_quantity_input": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "d",
          "s"
        ],
        "properties": {
          "d": {
            "type": "number",
            "description": "Annual demand, units per year",
            "exclusiveMinimum": 0
          },
          "s": {
            "type": "number",
            "description": "Cost per order placed (buyer time, inspection, freight booking)",
            "exclusiveMinimum": 0
          },
          "c": {
            "type": "number",
            "description": "Landed unit cost (needed when hm = pct)",
            "minimum": 0,
            "default": 8.5
          },
          "hm": {
            "type": "string",
            "description": "Holding cost given as % of unit cost per year (pct) or an amount per unit per year (abs)",
            "enum": [
              "pct",
              "abs"
            ],
            "default": "pct"
          },
          "h": {
            "type": "number",
            "description": "Holding cost: % per year (hm=pct) or amount per unit per year (hm=abs)",
            "exclusiveMinimum": 0,
            "default": 25
          },
          "q": {
            "type": "number",
            "description": "Optional: your current order quantity, to compare",
            "minimum": 0
          },
          "cur": {
            "type": "string",
            "description": "Currency label for the result",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "AUD"
            ],
            "default": "USD"
          }
        }
      },
      "economic_order_quantity_response": {
        "type": "object",
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "const": "eoq"
          },
          "inputs": {
            "type": "object",
            "description": "The inputs used, after defaults and normalisation"
          },
          "result": {
            "type": "object",
            "description": "The calculation result"
          },
          "method": {
            "type": "string",
            "description": "Formula, standard or data source used"
          },
          "source": {
            "type": "string",
            "format": "uri",
            "const": "https://sourcesquid.co/tools/eoq/",
            "description": "Cite this page when quoting the result"
          }
        }
      },
      "safety_stock_input": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "d",
          "sd",
          "lt"
        ],
        "properties": {
          "sl": {
            "type": "string",
            "description": "Cycle service level, %",
            "enum": [
              "80",
              "85",
              "90",
              "95",
              "97.5",
              "98",
              "99",
              "99.5",
              "99.9"
            ],
            "default": "95"
          },
          "d": {
            "type": "number",
            "description": "Average daily demand, units",
            "minimum": 0
          },
          "sd": {
            "type": "number",
            "description": "Standard deviation of daily demand, units",
            "minimum": 0
          },
          "lt": {
            "type": "number",
            "description": "Average lead time, days (order to stock ready to sell)",
            "minimum": 0
          },
          "slt": {
            "type": "number",
            "description": "Standard deviation of lead time, days",
            "minimum": 0,
            "default": 0
          },
          "c": {
            "type": "number",
            "description": "Landed unit cost, to value the buffer",
            "minimum": 0,
            "default": 0
          },
          "cur": {
            "type": "string",
            "description": "Currency label for the result",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "AUD"
            ],
            "default": "USD"
          }
        }
      },
      "safety_stock_response": {
        "type": "object",
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "const": "safety-stock"
          },
          "inputs": {
            "type": "object",
            "description": "The inputs used, after defaults and normalisation"
          },
          "result": {
            "type": "object",
            "description": "The calculation result"
          },
          "method": {
            "type": "string",
            "description": "Formula, standard or data source used"
          },
          "source": {
            "type": "string",
            "format": "uri",
            "const": "https://sourcesquid.co/tools/safety-stock/",
            "description": "Cite this page when quoting the result"
          }
        }
      },
      "incoterms_2020_input": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "rule": {
            "type": "string",
            "description": "Look up one rule",
            "enum": [
              "EXW",
              "FCA",
              "CPT",
              "CIP",
              "DAP",
              "DPU",
              "DDP",
              "FAS",
              "FOB",
              "CFR",
              "CIF"
            ]
          },
          "all": {
            "type": "boolean",
            "description": "Return all 11 rules"
          },
          "mode": {
            "type": "string",
            "description": "How the goods travel: cont (sea containers), bulk (sea bulk or break-bulk), air, road (road or rail), multi (more than one mode)",
            "enum": [
              "cont",
              "bulk",
              "air",
              "road",
              "multi"
            ],
            "default": "cont"
          },
          "frt": {
            "type": "string",
            "description": "Who books the main freight: B buyer, S seller, SI seller with insurance",
            "enum": [
              "B",
              "S",
              "SI"
            ],
            "default": "B"
          },
          "exp": {
            "type": "string",
            "description": "Who clears export: S seller, B buyer",
            "enum": [
              "S",
              "B"
            ],
            "default": "S"
          },
          "imp": {
            "type": "string",
            "description": "Who clears import and pays duties: B buyer, S seller",
            "enum": [
              "B",
              "S"
            ],
            "default": "B"
          },
          "risk": {
            "type": "string",
            "description": "Where risk should pass: prem (seller's premises), orig (at origin, when handed over), dest (destination, before unloading), destU (after unloading)",
            "enum": [
              "prem",
              "orig",
              "dest",
              "destU"
            ],
            "default": "orig"
          }
        }
      },
      "incoterms_2020_response": {
        "type": "object",
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "const": "incoterms"
          },
          "inputs": {
            "type": "object",
            "description": "The inputs used, after defaults and normalisation"
          },
          "result": {
            "type": "object",
            "description": "The calculation result"
          },
          "method": {
            "type": "string",
            "description": "Formula, standard or data source used"
          },
          "source": {
            "type": "string",
            "format": "uri",
            "const": "https://sourcesquid.co/tools/incoterms-advisor/",
            "description": "Cite this page when quoting the result"
          }
        }
      },
      "india_cluster_finder_input": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "product": {
            "type": "string",
            "description": "Atlas product family slug",
            "enum": [
              "investment-castings",
              "aluminium-extrusion-profiles",
              "machined-welded-assemblies",
              "tube-bending-welded-frames",
              "injection-moulded-plastic-parts",
              "fibc-jumbo-bags",
              "cargo-nets-webbing-straps",
              "filter-bags-anti-static-pouches",
              "electronics-pcb-assemblies",
              "automotive-seat-covers-trim",
              "plastic-pallets-returnable-packaging",
              "brass-metal-home-decor",
              "knitwear-t-shirts",
              "home-textiles-towels-rugs",
              "leather-goods-footwear",
              "closed-die-forgings-flanges",
              "fasteners",
              "hand-tools",
              "machined-auto-components",
              "pump-valve-components",
              "sheet-metal-enclosures",
              "wire-harnesses-cables",
              "brass-hardware-fittings",
              "iron-sand-castings",
              "aluminium-zinc-die-castings",
              "ceramic-tableware-tiles",
              "decor-lighting",
              "marble-stone-decor",
              "wooden-cane-furniture",
              "wooden-handicrafts-toys",
              "hand-knotted-tufted-rugs",
              "bed-kitchen-linen",
              "denim-woven-fabrics",
              "woven-garments",
              "handloom-block-printed-textiles",
              "jute-cotton-bags",
              "leather-bags-accessories",
              "sports-goods",
              "silver-fashion-jewellery",
              "printed-packaging-stationery",
              "leather-saddlery-equestrian",
              "organic-coconut-products",
              "wooden-kitchenware-serveware",
              "yoga-meditation-cushions",
              "cast-iron-fitness-equipment",
              "leather-aprons-workwear",
              "handmade-stoneware-ceramic-decor",
              "areca-bagasse-tableware"
            ]
          },
          "material": {
            "type": "string",
            "description": "Atlas material slug",
            "enum": [
              "carbon-steel",
              "stainless-steel",
              "cast-iron",
              "aluminium",
              "brass-and-copper",
              "zinc-alloy",
              "engineering-plastics",
              "polypropylene-polyethylene",
              "rubber",
              "cotton",
              "polyester-synthetics",
              "wool",
              "silk",
              "jute-and-natural-fibres",
              "leather",
              "wood-bamboo-and-cane",
              "glass",
              "ceramics-stoneware",
              "natural-stone-marble",
              "paper-board",
              "coconut",
              "agri-residue-fibres"
            ]
          },
          "process": {
            "type": "string",
            "description": "Process family code or slug",
            "enum": [
              "CAST",
              "FORG",
              "MACH",
              "SHEET",
              "TUBE",
              "PLAS",
              "ELEC",
              "AUTO",
              "WEAVE",
              "KNIT",
              "GARM",
              "HOME",
              "PRINT",
              "LEATH",
              "WOOD",
              "CERA",
              "STONE",
              "METAL",
              "JEWEL",
              "CHEM",
              "FOOD",
              "SPORT",
              "TOOL",
              "FIBRE",
              "PACK",
              "casting-and-foundry",
              "forging",
              "machining-and-precision",
              "sheet-metal-and-fabrication",
              "tube-extrusion-and-wire",
              "plastics-and-rubber-moulding",
              "electronics-and-assembly",
              "auto-and-ev-components",
              "weaving-and-handloom",
              "knitting-and-knitwear",
              "garments-and-cut-make-trim",
              "home-textiles-and-carpets",
              "dyeing-printing-and-embroidery",
              "leather-and-footwear",
              "wood-cane-and-furniture",
              "ceramics-and-glass",
              "stone-and-marble",
              "metalware-and-brass",
              "gems-and-jewellery",
              "chemicals-and-pharma",
              "food-spices-and-agri",
              "sports-goods-and-toys",
              "hand-tools-and-hardware",
              "natural-fibres-jute-coir-bamboo",
              "printing-and-packaging"
            ]
          },
          "q": {
            "type": "string",
            "description": "Search words, e.g. \"towels\", \"brass\", \"Tamil Nadu\", \"bicycles\"",
            "maxLength": 200
          },
          "limit": {
            "type": "integer",
            "description": "Number of clusters to return",
            "minimum": 1,
            "maximum": 30,
            "default": 8
          }
        }
      },
      "india_cluster_finder_response": {
        "type": "object",
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "const": "india-clusters"
          },
          "inputs": {
            "type": "object",
            "description": "The inputs used, after defaults and normalisation"
          },
          "result": {
            "type": "object",
            "description": "The calculation result"
          },
          "method": {
            "type": "string",
            "description": "Formula, standard or data source used"
          },
          "source": {
            "type": "string",
            "format": "uri",
            "const": "https://sourcesquid.co/tools/india-cluster-finder/",
            "description": "Cite this page when quoting the result"
          }
        }
      }
    }
  }
}
