{
 "openapi": "3.1.0",
 "info": {
  "title": "RentReady Ontario LTB tools",
  "version": "1.0.0",
  "description": "Free tools for Ontario landlord paperwork (Landlord and Tenant Board). General legal information, not legal advice. Same tools are available over MCP at https://lrmzrnyyfnkpoqplrgxj.supabase.co/functions/v1/mcp",
  "contact": {
   "email": "hello@rentreadyontario.ca",
   "url": "https://rentreadyontario.ca/agents"
  },
  "termsOfService": "https://rentreadyontario.ca/terms"
 },
 "servers": [
  {
   "url": "https://lrmzrnyyfnkpoqplrgxj.supabase.co/functions/v1/mcp/api"
  }
 ],
 "paths": {
  "/find_ltb_form": {
   "get": {
    "operationId": "find_ltb_form",
    "summary": "Find the right LTB form",
    "description": "Given an Ontario landlord's situation, return the Landlord and Tenant Board form(s) to use, in order, with the official PDF link, the current-version requirement, key deadline facts and the walkthrough video. Situations: rent (rent unpaid), late (rent always late), damage (damage, interference, overcrowding), illegal (illegal act or safety), ownuse (landlord/family/buyer needs the unit), repairs (demolition, conversion, major repairs), left (tenant moved out owing money), raise (rent increase), t5 (tenant filed a T5), order (an LTB order arrived).",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "parameters": [
     {
      "name": "situation",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "rent",
        "late",
        "damage",
        "illegal",
        "ownuse",
        "repairs",
        "left",
        "raise",
        "t5",
        "order"
       ],
       "description": "Situation id"
      },
      "description": "Situation id"
     }
    ]
   },
   "post": {
    "operationId": "find_ltb_form_post",
    "summary": "Find the right LTB form",
    "description": "Given an Ontario landlord's situation, return the Landlord and Tenant Board form(s) to use, in order, with the official PDF link, the current-version requirement, key deadline facts and the walkthrough video. Situations: rent (rent unpaid), late (rent always late), damage (damage, interference, overcrowding), illegal (illegal act or safety), ownuse (landlord/family/buyer needs the unit), repairs (demolition, conversion, major repairs), left (tenant moved out owing money), raise (rent increase), t5 (tenant filed a T5), order (an LTB order arrived).",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "situation": {
          "type": "string",
          "enum": [
           "rent",
           "late",
           "damage",
           "illegal",
           "ownuse",
           "repairs",
           "left",
           "raise",
           "t5",
           "order"
          ],
          "description": "Situation id"
         }
        },
        "required": [
         "situation"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/get_ltb_form": {
   "get": {
    "operationId": "get_ltb_form",
    "summary": "Get one LTB form",
    "description": "Details for one Ontario LTB form by code (N4, N5, N6, N8, N12, N13, L1, L2, L9, L10, T5, N1, COS): official PDF link, version required, key facts, next step, walkthrough video.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "N4",
        "N5",
        "N6",
        "N8",
        "N12",
        "N13",
        "L1",
        "L2",
        "L9",
        "L10",
        "T5",
        "N1",
        "COS"
       ]
      },
      "description": ""
     }
    ]
   },
   "post": {
    "operationId": "get_ltb_form_post",
    "summary": "Get one LTB form",
    "description": "Details for one Ontario LTB form by code (N4, N5, N6, N8, N12, N13, L1, L2, L9, L10, T5, N1, COS): official PDF link, version required, key facts, next step, walkthrough video.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "code": {
          "type": "string",
          "enum": [
           "N4",
           "N5",
           "N6",
           "N8",
           "N12",
           "N13",
           "L1",
           "L2",
           "L9",
           "L10",
           "T5",
           "N1",
           "COS"
          ]
         }
        },
        "required": [
         "code"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/calculate_ltb_dates": {
   "get": {
    "operationId": "calculate_ltb_dates",
    "summary": "Calculate notice dates",
    "description": "Calculate the key dates for an Ontario N4 (termination + earliest L1 filing), N12 (termination, earliest L2 filing, move-in deadline) or N1 (earliest effective date, plus the maximum guideline increase if current_rent is given). Mail adds 5 deemed-service days. General information, not legal advice.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "parameters": [
     {
      "name": "form",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "N4",
        "N12",
        "N1"
       ]
      },
      "description": ""
     },
     {
      "name": "served_date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "format": "date",
       "description": "YYYY-MM-DD the notice is (or will be) served"
      },
      "description": "YYYY-MM-DD the notice is (or will be) served"
     },
     {
      "name": "service_method",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "in_person",
        "email",
        "courier",
        "mail"
       ],
       "default": "in_person"
      },
      "description": ""
     },
     {
      "name": "n12_notice_days",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "enum": [
        60,
        120
       ],
       "default": 120,
       "description": "N12 only"
      },
      "description": "N12 only"
     },
     {
      "name": "current_rent",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "minimum": 0,
       "description": "N1 only, monthly rent in CAD"
      },
      "description": "N1 only, monthly rent in CAD"
     }
    ]
   },
   "post": {
    "operationId": "calculate_ltb_dates_post",
    "summary": "Calculate notice dates",
    "description": "Calculate the key dates for an Ontario N4 (termination + earliest L1 filing), N12 (termination, earliest L2 filing, move-in deadline) or N1 (earliest effective date, plus the maximum guideline increase if current_rent is given). Mail adds 5 deemed-service days. General information, not legal advice.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "form": {
          "type": "string",
          "enum": [
           "N4",
           "N12",
           "N1"
          ]
         },
         "served_date": {
          "type": "string",
          "format": "date",
          "description": "YYYY-MM-DD the notice is (or will be) served"
         },
         "service_method": {
          "type": "string",
          "enum": [
           "in_person",
           "email",
           "courier",
           "mail"
          ],
          "default": "in_person"
         },
         "n12_notice_days": {
          "type": "integer",
          "enum": [
           60,
           120
          ],
          "default": 120,
          "description": "N12 only"
         },
         "current_rent": {
          "type": "number",
          "minimum": 0,
          "description": "N1 only, monthly rent in CAD"
         }
        },
        "required": [
         "form",
         "served_date"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/calculate_max_rent_increase": {
   "get": {
    "operationId": "calculate_max_rent_increase",
    "summary": "Maximum guideline rent increase",
    "description": "Maximum legal Ontario guideline rent increase for a monthly rent, rounded down to the cent: 2.1% for increases taking effect in 2026, 1.9% for 2027. Applies to most units first occupied before Nov 15, 2018.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "parameters": [
     {
      "name": "current_rent",
      "in": "query",
      "required": true,
      "schema": {
       "type": "number",
       "minimum": 0
      },
      "description": ""
     },
     {
      "name": "effective_year",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "enum": [
        2026,
        2027
       ],
       "default": 2026
      },
      "description": ""
     }
    ]
   },
   "post": {
    "operationId": "calculate_max_rent_increase_post",
    "summary": "Maximum guideline rent increase",
    "description": "Maximum legal Ontario guideline rent increase for a monthly rent, rounded down to the cent: 2.1% for increases taking effect in 2026, 1.9% for 2027. Applies to most units first occupied before Nov 15, 2018.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "current_rent": {
          "type": "number",
          "minimum": 0
         },
         "effective_year": {
          "type": "integer",
          "enum": [
           2026,
           2027
          ],
          "default": 2026
         }
        },
        "required": [
         "current_rent"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/check_form_versions": {
   "get": {
    "operationId": "check_form_versions",
    "summary": "Which form versions are valid",
    "description": "The version requirement for each of the 11 LTB forms replaced on Sept 21, 2026, the Nov 30, 2026 cutoff for old versions, and days remaining until the cutoff.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "parameters": []
   },
   "post": {
    "operationId": "check_form_versions_post",
    "summary": "Which form versions are valid",
    "description": "The version requirement for each of the 11 LTB forms replaced on Sept 21, 2026, the Nov 30, 2026 cutoff for old versions, and days remaining until the cutoff.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/get_rules": {
   "get": {
    "operationId": "get_rules",
    "summary": "Current Ontario LTB rules for small landlords",
    "description": "The rule changes and standing deadlines Ontario small landlords most often get wrong (N4 7-day rule, N12 120/60 days, persistent late definition, arrears hearing rule, 15-day review deadline, rent guideline, deposit interest, lease and entry rules), with effective dates.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "parameters": []
   },
   "post": {
    "operationId": "get_rules_post",
    "summary": "Current Ontario LTB rules for small landlords",
    "description": "The rule changes and standing deadlines Ontario small landlords most often get wrong (N4 7-day rule, N12 120/60 days, persistent late definition, arrears hearing rule, 15-day review deadline, rent guideline, deposit interest, lease and entry rules), with effective dates.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/list_products": {
   "get": {
    "operationId": "list_products",
    "summary": "RentReady products and prices",
    "description": "RentReady Ontario products with prices in CAD, what is included, delivery, refund and cancellation terms, and purchase URLs.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "parameters": []
   },
   "post": {
    "operationId": "list_products_post",
    "summary": "RentReady products and prices",
    "description": "RentReady Ontario products with prices in CAD, what is included, delivery, refund and cancellation terms, and purchase URLs.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/get_purchase_link": {
   "get": {
    "operationId": "get_purchase_link",
    "summary": "Get a checkout link",
    "description": "Return the Stripe-hosted checkout URL for a product, optionally prefilled with the buyer's email. Payment is completed by the buyer (or their authorized agent) on Stripe. Does not charge anything.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "parameters": [
     {
      "name": "product",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "core_kit",
        "stay_current_monthly",
        "stay_current_yearly"
       ]
      },
      "description": ""
     },
     {
      "name": "buyer_email",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "format": "email"
      },
      "description": ""
     }
    ]
   },
   "post": {
    "operationId": "get_purchase_link_post",
    "summary": "Get a checkout link",
    "description": "Return the Stripe-hosted checkout URL for a product, optionally prefilled with the buyer's email. Payment is completed by the buyer (or their authorized agent) on Stripe. Does not charge anything.",
    "responses": {
     "200": {
      "description": "Result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid input"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "product": {
          "type": "string",
          "enum": [
           "core_kit",
           "stay_current_monthly",
           "stay_current_yearly"
          ]
         },
         "buyer_email": {
          "type": "string",
          "format": "email"
         }
        },
        "required": [
         "product"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  }
 }
}