{"openapi":"3.1.0","info":{"title":"District API (BYOK) API","version":"0.1.0","description":"District API (BYOK) lets an AI assistant read your own District API data through the District API API with a key you supply (DistrictAPI key). Read-only: 7 tools (lookup_district, get_district, list_district_schools, search_districts, find_schools_nearby, get_school, get_school_district). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached;...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-districtapi.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-districtapi/docs"},"termsOfService":"https://connectorbay.com/byok-districtapi/terms"},"servers":[{"url":"https://byok-districtapi.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-districtapi/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/lookup_district":{"post":{"operationId":"lookup_district","summary":"Find the school district that serves an address or a latitude/longitude, or fetch one by NCES id. Give exactly one of ad","description":"Find the school district that serves an address or a latitude/longitude, or fetch one by NCES id. Give exactly one of address, lat with lng, or nces_id. Returns name, grades, enrollment, finance and contact details. Use for \"Which school district covers 12865 Main St, Apple Valley, CA\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"address":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"US street address, geocoded to find the district, for example '12865 Main St, Apple Valley, CA'.","title":"Address"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Latitude in decimal degrees (use together with lng).","title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Longitude in decimal degrees (use together with lat).","title":"Lng"},"nces_id":{"anyOf":[{"maxLength":7,"type":"string"},{"type":"null"}],"default":null,"description":"Seven-digit NCES LEA id.","title":"Nces Id"}},"title":"lookup_districtArguments","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_district":{"post":{"operationId":"get_district","summary":"Get the full profile of one school district by its seven-digit NCES LEA id: location, grades, enrollment, per-pupil spen","description":"Get the full profile of one school district by its seven-digit NCES LEA id: location, grades, enrollment, per-pupil spending and school count. Use for \"Show me the profile of school district 0600017\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"district_id":{"description":"Seven-digit NCES LEA id of the school district, for example '0600017'.","maxLength":7,"title":"District Id","type":"string"}},"required":["district_id"],"title":"get_districtArguments","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_district_schools":{"post":{"operationId":"list_district_schools","summary":"List the open schools of a district, optionally only one school type or only charter schools. Returns name, grades, enro","description":"List the open schools of a district, optionally only one school type or only charter schools. Returns name, grades, enrollment, coordinates and address. Use for \"List the charter schools in district 0600017\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"district_id":{"description":"Seven-digit NCES LEA id of the school district, for example '0600017'.","maxLength":7,"title":"District Id","type":"string"},"type":{"anyOf":[{"maximum":4,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"School type code: 1 regular, 2 special education, 3 vocational, 4 alternative.","title":"Type"},"charter":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list only charter schools.","title":"Charter"}},"required":["district_id"],"title":"list_district_schoolsArguments","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/search_districts":{"post":{"operationId":"search_districts","summary":"Search school districts by name, state or county (at least one is needed). Returns id, name, state, county, grades, enro","description":"Search school districts by name, state or county (at least one is needed). Returns id, name, state, county, grades, enrollment and coordinates, with limit/offset paging. Use for \"Find school districts named Unified in California\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"District name text (full-text search).","title":"Name"},"state":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter US state code, for example 'CA'.","title":"State"},"county":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"County name, partial matches allowed.","title":"County"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of results to skip, for paging.","title":"Offset"}},"title":"search_districtsArguments","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/find_schools_nearby":{"post":{"operationId":"find_schools_nearby","summary":"Find schools within a radius of an address or a latitude/longitude, with type, grades, enrollment and charter, magnet or","description":"Find schools within a radius of an address or a latitude/longitude, with type, grades, enrollment and charter, magnet or virtual flags. Give an address or lat with lng. Use for \"Which schools are within 3 miles of 12865 Main St, Apple Valley, CA\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"address":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"US street address used as the centre of the search.","title":"Address"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Latitude of the centre point (use with lng).","title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Longitude of the centre point (use with lat).","title":"Lng"},"radius_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"default":5,"description":"Search radius in miles (maximum 50, default 5).","title":"Radius Miles"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Maximum results (1 to 100).","title":"Limit"}},"title":"find_schools_nearbyArguments","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_school":{"post":{"operationId":"get_school","summary":"Get the full profile of one school by its twelve-digit NCES school id. Use for \"Show the profile of school 060001706027\"","description":"Get the full profile of one school by its twelve-digit NCES school id. Use for \"Show the profile of school 060001706027\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"school_id":{"description":"Twelve-digit NCES school id, for example '060001706027'.","maxLength":12,"title":"School Id","type":"string"}},"required":["school_id"],"title":"get_schoolArguments","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_school_district":{"post":{"operationId":"get_school_district","summary":"Get the parent district of a school, given the school's twelve-digit NCES id. Use for \"Which district does school 060001","description":"Get the parent district of a school, given the school's twelve-digit NCES id. Use for \"Which district does school 060001706027 belong to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"school_id":{"description":"Twelve-digit NCES school id, for example '060001706027'.","maxLength":12,"title":"School Id","type":"string"}},"required":["school_id"],"title":"get_school_districtArguments","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}}}}