{"openapi":"3.1.0","info":{"title":"CanLII (BYOK) API","version":"0.1.0","description":"CanLII (BYOK) lets an AI assistant read your own CanLII data through the CanLII API with a key you supply (CanLII API key). Read-only: 8 tools (list_court_databases, list_cases, get_case, get_cited_cases, get_citing_cases, list_legislation_databases, list_legislation, get_legislation). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-canlii.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-canlii/docs"},"termsOfService":"https://connectorbay.com/byok-canlii/terms"},"servers":[{"url":"https://byok-canlii.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-canlii/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_court_databases":{"post":{"operationId":"list_court_databases","summary":"List the Canadian courts and tribunals in the CanLII collection with the databaseId used by the other case tools. Use fo","description":"List the Canadian courts and tribunals in the CanLII collection with the databaseId used by the other case tools. Use for \"Which courts and tribunals does CanLII cover\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"language":{"description":"Output language: en or fr.","enum":["en","fr"],"title":"Language","type":"string"}},"required":["language"],"title":"list_court_databasesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_cases":{"post":{"operationId":"list_cases","summary":"List decisions of one court or tribunal database, newest additions first, with id, title and citation; optional date fil","description":"List decisions of one court or tribunal database, newest additions first, with id, title and citation; optional date filters. Use for \"What are the latest decisions of the Ontario Court of Appeal\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"language":{"description":"Output language: en or fr.","enum":["en","fr"],"title":"Language","type":"string"},"database_id":{"description":"Court or tribunal database id from list_court_databases, for example 'csc-scc' or 'onca'.","maxLength":200,"title":"Database Id","type":"string"},"offset":{"anyOf":[{"maximum":10000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Record number to start from; 0 returns the most recently added.","title":"Offset"},"result_count":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many decisions to return (1 to 10000; the assistant output is capped lower).","title":"Result Count"},"published_after":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only decisions first published on or after this date (YYYY-MM-DD).","title":"Published After"},"published_before":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only decisions first published on or before this date (YYYY-MM-DD).","title":"Published Before"},"decision_date_after":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only decisions dated on or after this date (YYYY-MM-DD).","title":"Decision Date After"},"decision_date_before":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only decisions dated on or before this date (YYYY-MM-DD).","title":"Decision Date Before"}},"required":["language","database_id"],"title":"list_casesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_case":{"post":{"operationId":"get_case","summary":"Get metadata for one decision: title, citation, URL, docket number, decision date and keywords. Use for \"Give me the det","description":"Get metadata for one decision: title, citation, URL, docket number, decision date and keywords. Use for \"Give me the details of Dunsmuir v. New Brunswick, 2008 SCC 9\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"language":{"description":"Output language: en or fr.","enum":["en","fr"],"title":"Language","type":"string"},"database_id":{"description":"Court database id, for example 'csc-scc'.","maxLength":200,"title":"Database Id","type":"string"},"case_id":{"description":"Case id, for example '2008scc9'.","maxLength":200,"title":"Case Id","type":"string"}},"required":["language","database_id","case_id"],"title":"get_caseArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_cited_cases":{"post":{"operationId":"get_cited_cases","summary":"List the cases that a decision cites (English only). Use for \"Which cases does 1999canlii1527 of the Ontario Court of Ap","description":"List the cases that a decision cites (English only). Use for \"Which cases does 1999canlii1527 of the Ontario Court of Appeal cite\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"database_id":{"description":"Court or tribunal database id from list_court_databases, for example 'csc-scc' or 'onca'.","maxLength":200,"title":"Database Id","type":"string"},"case_id":{"description":"Case id, for example '1999canlii1527'.","maxLength":200,"title":"Case Id","type":"string"}},"required":["database_id","case_id"],"title":"get_cited_casesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_citing_cases":{"post":{"operationId":"get_citing_cases","summary":"List the cases that cite a decision (English only). Use for \"Which later decisions cite Dunsmuir, 2008 SCC 9\".","description":"List the cases that cite a decision (English only). Use for \"Which later decisions cite Dunsmuir, 2008 SCC 9\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"database_id":{"description":"Court database id, for example 'csc-scc'.","maxLength":200,"title":"Database Id","type":"string"},"case_id":{"description":"Case id, for example '2008scc9'.","maxLength":200,"title":"Case Id","type":"string"}},"required":["database_id","case_id"],"title":"get_citing_casesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_legislation_databases":{"post":{"operationId":"list_legislation_databases","summary":"List the legislation and regulation databases on CanLII (annual statutes, statutes, regulations by jurisdiction). Use fo","description":"List the legislation and regulation databases on CanLII (annual statutes, statutes, regulations by jurisdiction). Use for \"Which legislation databases does CanLII have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"language":{"description":"Output language: en or fr.","enum":["en","fr"],"title":"Language","type":"string"}},"required":["language"],"title":"list_legislation_databasesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_legislation":{"post":{"operationId":"list_legislation","summary":"List the statutes or regulations in one legislation database with id, title, citation and type. Use for \"List the statut","description":"List the statutes or regulations in one legislation database with id, title, citation and type. Use for \"List the statutes of Ontario on CanLII\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"language":{"description":"Output language: en or fr.","enum":["en","fr"],"title":"Language","type":"string"},"database_id":{"description":"Legislation database id from list_legislation_databases, for example 'ons' (Ontario statutes).","maxLength":200,"title":"Database Id","type":"string"}},"required":["language","database_id"],"title":"list_legislationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_legislation":{"post":{"operationId":"get_legislation","summary":"Get metadata for one statute or regulation: title, citation, URL, dates, repeal status and content parts. Use for \"Is th","description":"Get metadata for one statute or regulation: title, citation, URL, dates, repeal status and content parts. Use for \"Is the Ontario Abandoned Orchards Act still in force\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"language":{"description":"Output language: en or fr.","enum":["en","fr"],"title":"Language","type":"string"},"database_id":{"description":"Legislation database id from list_legislation_databases, for example 'ons' (Ontario statutes).","maxLength":200,"title":"Database Id","type":"string"},"legislation_id":{"description":"Legislation id from list_legislation, for example 'rso-1990-c-a1'.","maxLength":200,"title":"Legislation Id","type":"string"}},"required":["language","database_id","legislation_id"],"title":"get_legislationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}