{
  "openapi": "3.1.0",
  "info": {
    "title": "Heffl Free Tools API",
    "version": "1.1.0",
    "description": "Anonymous Heffl calculators, templates, drafts and email verification. JSON API and Streamable HTTP MCP; calls do not send documents or messages."
  },
  "servers": [
    {
      "url": "https://api.heffl.com"
    }
  ],
  "security": [],
  "paths": {
    "/api/public-tools/email/verify": {
      "post": {
        "operationId": "email_verify",
        "summary": "Verify an email address",
        "description": "Check one email's syntax, mail routing, disposable/free-provider/role flags, and SMTP recipient acceptance. Sends no email. DNS alone does not verify a mailbox. unknown means inconclusive or mailbox not checked; likely_deliverable is evidence, not a delivery guarantee. No login or API key required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification evidence. invalid is a successful check, not an HTTP error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerification"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request; provide one email string."
          },
          "413": {
            "description": "Request body too large."
          },
          "429": {
            "description": "Rate or concurrency limit; retry after Retry-After seconds."
          },
          "503": {
            "description": "Verification service unavailable."
          }
        }
      }
    },
    "/api/public-tools/photography/pricing": {
      "post": {
        "operationId": "photography_pricing",
        "summary": "Photography pricing",
        "description": "Calculate session price, costs, profit and per-photo price. Margin is a percentage of selling price; currency-neutral, no conversion. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "hoursOnSite": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "hourlyRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  },
                  "editingHours": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "editingRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  },
                  "gearTravelCost": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  },
                  "numPhotos": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1000000
                  },
                  "margin": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 95
                  }
                },
                "required": [
                  "hoursOnSite",
                  "hourlyRate",
                  "editingHours",
                  "editingRate",
                  "gearTravelCost",
                  "numPhotos",
                  "margin"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "shootLaborCost": {
                      "type": "number"
                    },
                    "editingCost": {
                      "type": "number"
                    },
                    "directCost": {
                      "type": "number"
                    },
                    "price": {
                      "type": "number"
                    },
                    "profit": {
                      "type": "number"
                    },
                    "perPhotoPrice": {
                      "type": "number"
                    },
                    "actualMargin": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "shootLaborCost",
                    "editingCost",
                    "directCost",
                    "price",
                    "profit",
                    "perPhotoPrice",
                    "actualMargin"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/freelance/rate": {
      "post": {
        "operationId": "freelance_rate",
        "summary": "Freelance hourly and day rates",
        "description": "Calculate sustainable rates. margin is a percentage buffer added to annual income plus overhead, matching the website. All money must use the same currency. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "annualIncome": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  },
                  "overhead": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  },
                  "billableWeeks": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 53
                  },
                  "billableHours": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 168
                  },
                  "hoursPerDay": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 24
                  },
                  "margin": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 95
                  }
                },
                "required": [
                  "annualIncome",
                  "overhead",
                  "billableWeeks",
                  "billableHours",
                  "hoursPerDay",
                  "margin"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "totalNeeded": {
                      "type": "number"
                    },
                    "annualBillableHours": {
                      "type": "number"
                    },
                    "hourlyRate": {
                      "type": "number"
                    },
                    "dayRate": {
                      "type": "number"
                    },
                    "incomePortion": {
                      "type": "number"
                    },
                    "overheadPortion": {
                      "type": "number"
                    },
                    "marginPortion": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "totalNeeded",
                    "annualBillableHours",
                    "hourlyRate",
                    "dayRate",
                    "incomePortion",
                    "overheadPortion",
                    "marginPortion"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/agency/pricing": {
      "post": {
        "operationId": "agency_pricing",
        "summary": "Agency pricing and profitability",
        "description": "Calculate project price from labor, overhead and risk buffer. margin is percentage of selling price; overhead and riskBuffer are percentage additions. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "hourlyCost": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  },
                  "hours": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1000000
                  },
                  "overhead": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "margin": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 95
                  },
                  "riskBuffer": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "hourlyCost",
                  "hours",
                  "overhead",
                  "margin",
                  "riskBuffer"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "bufferedHours": {
                      "type": "number"
                    },
                    "directLabor": {
                      "type": "number"
                    },
                    "overheadCost": {
                      "type": "number"
                    },
                    "totalCost": {
                      "type": "number"
                    },
                    "basePrice": {
                      "type": "number"
                    },
                    "profit": {
                      "type": "number"
                    },
                    "effectiveRate": {
                      "type": "number"
                    },
                    "actualMargin": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "bufferedHours",
                    "directLabor",
                    "overheadCost",
                    "totalCost",
                    "basePrice",
                    "profit",
                    "effectiveRate",
                    "actualMargin"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/business/days": {
      "post": {
        "operationId": "business_days",
        "summary": "Business days and date offsets",
        "description": "Count weekdays between dates or add/subtract days. UTC dates, Monday–Friday; start included and end excluded unless includeEnd. Offset excludes start. Public holidays are not excluded. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "between"
                      },
                      "startDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "endDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "includeEnd": {
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "mode",
                      "startDate",
                      "endDate"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "offset"
                      },
                      "startDate": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "days": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 36525
                      },
                      "direction": {
                        "default": "add",
                        "type": "string",
                        "enum": [
                          "add",
                          "subtract"
                        ]
                      },
                      "businessOnly": {
                        "default": true,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "mode",
                      "startDate",
                      "days"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "between",
                        "offset"
                      ]
                    },
                    "startDate": {
                      "type": "string"
                    },
                    "endDate": {
                      "type": "string"
                    },
                    "calendarDays": {
                      "type": "number"
                    },
                    "businessDays": {
                      "type": "number"
                    },
                    "weekendDays": {
                      "type": "number"
                    },
                    "holidaysExcluded": {
                      "type": "boolean",
                      "const": false
                    }
                  },
                  "required": [
                    "mode",
                    "startDate",
                    "endDate",
                    "holidaysExcluded"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/risk/assessment": {
      "post": {
        "operationId": "risk_assessment",
        "summary": "Project risk assessment",
        "description": "Score user-supplied risks using likelihood × impact (1–5). Low <=6, medium <=14, high >=15. Does not infer likelihood or impact. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "risks": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "likelihood": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 5
                        },
                        "impact": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 5
                        },
                        "mitigation": {
                          "default": "",
                          "type": "string",
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "name",
                        "likelihood",
                        "impact"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "risks"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "risks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "likelihood": {
                            "type": "number"
                          },
                          "impact": {
                            "type": "number"
                          },
                          "mitigation": {
                            "type": "string"
                          },
                          "score": {
                            "type": "number"
                          },
                          "level": {
                            "type": "string",
                            "enum": [
                              "Low",
                              "Medium",
                              "High"
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "likelihood",
                          "impact",
                          "mitigation",
                          "score",
                          "level"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "risks"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/coaching/agreement": {
      "post": {
        "operationId": "coaching_agreement",
        "summary": "Coaching agreement template",
        "description": "Generate the website's coaching agreement as plain text. Missing text fields use placeholders. Draft only; legal review may be needed. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "coachName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "businessName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "clientName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "coachingType": {
                    "default": "life coaching",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "sessionFormat": {
                    "default": "1:1 video calls",
                    "type": "string",
                    "enum": [
                      "1:1 video calls",
                      "1:1 phone calls",
                      "In-person sessions",
                      "Group sessions"
                    ]
                  },
                  "programLength": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "sessionLength": {
                    "default": 60,
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1440
                  },
                  "fee": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "paymentTerms": {
                    "default": "Full payment upfront",
                    "type": "string",
                    "enum": [
                      "Full payment upfront",
                      "50% upfront, 50% at midpoint",
                      "Monthly installments",
                      "Pay per session"
                    ]
                  },
                  "cancellationPolicy": {
                    "default": "24 hours notice required",
                    "type": "string",
                    "enum": [
                      "24 hours notice required",
                      "48 hours notice required",
                      "No refunds after session 1"
                    ]
                  },
                  "startDate": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "format": {
                      "type": "string",
                      "const": "text/plain"
                    },
                    "notice": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "text",
                    "format",
                    "notice"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/retainer/agreement": {
      "post": {
        "operationId": "retainer_agreement",
        "summary": "Retainer agreement template",
        "description": "Generate the website's monthly retainer agreement as plain text. Missing text fields use placeholders. Draft only; legal review may be needed. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "providerName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "clientName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "serviceType": {
                    "default": "ongoing marketing and design services",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "monthlyFee": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "includedScope": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "overageRate": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "contractTerm": {
                    "default": "Month-to-month",
                    "type": "string",
                    "enum": [
                      "Month-to-month",
                      "3-month minimum",
                      "6-month minimum",
                      "12-month term"
                    ]
                  },
                  "noticePeriod": {
                    "default": "30 days written notice",
                    "type": "string",
                    "enum": [
                      "30 days written notice",
                      "60 days written notice",
                      "14 days written notice"
                    ]
                  },
                  "paymentDue": {
                    "default": "1st of each month, in advance",
                    "type": "string",
                    "enum": [
                      "1st of each month, in advance",
                      "Net 15",
                      "Net 30"
                    ]
                  },
                  "startDate": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "format": {
                      "type": "string",
                      "const": "text/plain"
                    },
                    "notice": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "text",
                    "format",
                    "notice"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/uae/vat": {
      "post": {
        "operationId": "uae_vat",
        "summary": "UAE VAT estimate",
        "description": "Estimate standard 5% UAE VAT in AED, inclusive or exclusive. Does not classify exempt or zero-rated supplies. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "amount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  },
                  "includeVat": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "amount"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "net": {
                      "type": "number"
                    },
                    "vat": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number"
                    },
                    "vatRate": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "net",
                    "vat",
                    "total",
                    "vatRate"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/uae/corporate/tax": {
      "post": {
        "operationId": "uae_corporate_tax",
        "summary": "UAE corporate tax estimate",
        "description": "Estimate standard UAE corporate tax on already-adjusted taxable income in AED: 0% up to 375000 and 9% above. Does not determine deductions, free-zone rules, relief or multinational minimum tax. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "taxableIncome": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  }
                },
                "required": [
                  "taxableIncome"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "taxableIncome": {
                      "type": "number"
                    },
                    "zeroRateBand": {
                      "type": "number"
                    },
                    "taxableAboveThreshold": {
                      "type": "number"
                    },
                    "tax": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "taxableIncome",
                    "zeroRateBand",
                    "taxableAboveThreshold",
                    "tax"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/uae/gratuity": {
      "post": {
        "operationId": "uae_gratuity",
        "summary": "UAE end-of-service gratuity estimate",
        "description": "AED estimate for covered private-sector full-time foreign workers using monthly basic salary, at least one year service, 21 days for first five years then 30; capped at 24 months basic salary. Assumes continuous service without unpaid leave; no deductions or alternative schemes assessed. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "basicSalary": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1000000000000
                  },
                  "startDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "endDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "basicSalary",
                  "startDate",
                  "endDate"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "yearsOfService": {
                      "type": "number"
                    },
                    "eligible": {
                      "type": "boolean"
                    },
                    "gratuity": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string",
                      "const": "AED"
                    }
                  },
                  "required": [
                    "yearsOfService",
                    "eligible",
                    "gratuity",
                    "currency"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/uae/real/estate/vat": {
      "post": {
        "operationId": "uae_real_estate_vat",
        "summary": "UAE property VAT estimate",
        "description": "Estimate VAT on ordinary commercial/residential property in AED, not transfer fees. Residential zero-rating requires FIRST supply within three years of completion; other residential supply exempt. No mixed-use or specialist properties. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "amount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000000000000
                  },
                  "includeVat": {
                    "default": false,
                    "type": "boolean"
                  },
                  "propertyType": {
                    "type": "string",
                    "enum": [
                      "commercial",
                      "residential"
                    ]
                  },
                  "firstSupply": {
                    "type": "boolean"
                  },
                  "yearsSinceCompletion": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000
                  }
                },
                "required": [
                  "amount",
                  "propertyType",
                  "firstSupply",
                  "yearsSinceCompletion"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "net": {
                      "type": "number"
                    },
                    "vat": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number"
                    },
                    "vatRate": {
                      "type": "number"
                    },
                    "treatment": {
                      "type": "string",
                      "enum": [
                        "standard",
                        "zero-rated",
                        "exempt"
                      ]
                    }
                  },
                  "required": [
                    "net",
                    "vat",
                    "total",
                    "vatRate",
                    "treatment"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/quotation/generate": {
      "post": {
        "operationId": "quotation_generate",
        "summary": "Quotation document data",
        "description": "Generate quotation JSON and plain-text draft with percentage discounts per item and tax on discounted amounts. Does not save, send, or render PDF; website provides visual export. Currency is a label, no FX conversion. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "quotationNumber": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "sender": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "client": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "lineItems": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "itemName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "quantity": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 1000000
                        },
                        "rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000000000
                        },
                        "discount": {
                          "default": 0,
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "tax": {
                          "default": 0,
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "itemName",
                        "quantity",
                        "rate"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "quotationNumber",
                  "sender",
                  "client",
                  "currency",
                  "lineItems"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "quotationNumber": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "lineItems": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "itemName": {
                            "type": "string"
                          },
                          "quantity": {
                            "type": "number"
                          },
                          "rate": {
                            "type": "number"
                          },
                          "discount": {
                            "type": "number"
                          },
                          "tax": {
                            "type": "number"
                          },
                          "net": {
                            "type": "number"
                          },
                          "taxAmount": {
                            "type": "number"
                          },
                          "total": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "itemName",
                          "quantity",
                          "rate",
                          "discount",
                          "tax",
                          "net",
                          "taxAmount",
                          "total"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "subtotal": {
                      "type": "number"
                    },
                    "tax": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number"
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "quotationNumber",
                    "currency",
                    "lineItems",
                    "subtotal",
                    "tax",
                    "total",
                    "text"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/sow/generate": {
      "post": {
        "operationId": "sow_generate",
        "summary": "AI scope of work draft",
        "description": "Generate a scope-of-work draft using the existing Heffl DeepSeek service. Returns untrusted HTML, not legal advice. Drafts may infer details; verify before use. Provider configuration required server-side. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "clientName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 200
                  },
                  "projectTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "serviceCategory": {
                    "default": "",
                    "type": "string",
                    "maxLength": 120
                  },
                  "projectGoals": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 4000
                  },
                  "deliverables": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  },
                  "timeline": {
                    "default": "",
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "projectTitle",
                  "projectGoals"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "sow": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "sow"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    },
    "/api/public-tools/whatsapp/generate": {
      "post": {
        "operationId": "whatsapp_generate",
        "summary": "AI WhatsApp message draft",
        "description": "Generate a business WhatsApp message draft using Heffl's DeepSeek service. Only drafts text; never sends messages. Provider configuration required server-side. Free, no authentication required. Rate limited.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "properties": {
                  "useCase": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "businessName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "businessBio": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "messageTone": {
                    "default": "Professional",
                    "type": "string",
                    "maxLength": 100
                  },
                  "addEmoji": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "useCase"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "413": {
            "description": "Body too large"
          },
          "429": {
            "description": "Rate or capacity limit; observe Retry-After"
          },
          "503": {
            "description": "Tool or AI provider unavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EmailVerification": {
        "type": "object",
        "required": [
          "email",
          "status",
          "reason",
          "checks",
          "suggestion",
          "checkedAt"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "invalid",
              "unknown",
              "likely_deliverable",
              "accept_all"
            ]
          },
          "reason": {
            "type": "string"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "suggestion": {
            "type": [
              "string",
              "null"
            ]
          },
          "checks": {
            "type": "object",
            "required": [
              "syntax",
              "mailRouting",
              "disposable",
              "freeProvider",
              "roleBased",
              "smtp",
              "catchAll"
            ],
            "properties": {
              "syntax": {
                "type": "string",
                "enum": [
                  "pass",
                  "fail",
                  "unsupported"
                ]
              },
              "mailRouting": {
                "type": "string",
                "enum": [
                  "pass",
                  "fail",
                  "unknown",
                  "not_checked"
                ]
              },
              "disposable": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "freeProvider": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "roleBased": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "smtp": {
                "type": "string",
                "enum": [
                  "accepted",
                  "rejected",
                  "unknown",
                  "not_checked"
                ]
              },
              "catchAll": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            }
          }
        }
      }
    }
  }
}
