{"openapi":"3.1.0","info":{"title":"Trefle (BYOK) API","version":"0.1.0","description":"Trefle (BYOK) lets an AI assistant read your own Trefle data through the Trefle API with a key you supply (Trefle access token). Read-only: 7 tools (search_plants, search_species, list_plants, list_species, get_plant, get_species, get_genus). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to trefle.io. Unofficial...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-trefle.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-trefle/docs"},"termsOfService":"https://connectorbay.com/byok-trefle/terms"},"servers":[{"url":"https://byok-trefle.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-trefle/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/search_plants":{"post":{"operationId":"search_plants","summary":"Search plants by common or scientific name; one entry per plant with family, genus, rank and image. Use for \"Find plants","description":"Search plants by common or scientific name; one entry per plant with family, genus, rank and image. Use for \"Find plants called coconut\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"description":"Search words, for example 'coconut' or 'Cocos nucifera'.","maxLength":100,"title":"Q","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (about 30 results per page).","title":"Page"}},"required":["q"],"title":"search_plantsArguments","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_species":{"post":{"operationId":"search_species","summary":"Search every species-level taxon (including subspecies and varieties) by name. Use for \"Search species for rose\".","description":"Search every species-level taxon (including subspecies and varieties) by name. Use for \"Search species for rose\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"description":"Search words, for example 'rose'.","maxLength":100,"title":"Q","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (about 30 results per page).","title":"Page"}},"required":["q"],"title":"search_speciesArguments","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_plants":{"post":{"operationId":"list_plants","summary":"List plants with optional filters on common name, woody type and maximum height; one entry per plant. Use for \"List tree","description":"List plants with optional filters on common name, woody type and maximum height; one entry per plant. Use for \"List trees taller than 20 metres in the Trefle database\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"common_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Exact common name, for example 'beach strawberry'.","title":"Common Name"},"ligneous_type":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Woody type, for example 'tree'.","title":"Ligneous Type"},"height_range_cm":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Maximum height range in centimetres as 'min,max', for example '5,20'; either side may be empty (',5' means below 5).","title":"Height Range Cm"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (about 30 results per page).","title":"Page"}},"title":"list_plantsArguments","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_species":{"post":{"operationId":"list_species","summary":"List species-level taxa with optional filters on common name, edibility, edible part and maximum height. Use for \"Which ","description":"List species-level taxa with optional filters on common name, edibility, edible part and maximum height. Use for \"Which plants have edible roots or leaves\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"common_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Exact common name.","title":"Common Name"},"edible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to return only edible species.","title":"Edible"},"edible_part":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Edible parts, comma separated, for example 'roots,leaves'.","title":"Edible Part"},"height_range_cm":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Maximum height range in centimetres as 'min,max', for example '5,20'; either side may be empty (',5' means below 5).","title":"Height Range Cm"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1 (about 30 results per page).","title":"Page"}},"title":"list_speciesArguments","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_plant":{"post":{"operationId":"get_plant","summary":"Get one plant's full record (by numeric ID or slug) including its main species, images, growth and distribution data as ","description":"Get one plant's full record (by numeric ID or slug) including its main species, images, growth and distribution data as sent by Trefle. Use for \"Give me the full record for the plant cocos-nucifera\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"plant_id":{"description":"Plant numeric ID or slug, for example 'cocos-nucifera'.","maxLength":100,"title":"Plant Id","type":"string"}},"required":["plant_id"],"title":"get_plantArguments","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_species":{"post":{"operationId":"get_species","summary":"Get one species' full record (by numeric ID or slug) including growth, specifications, flowers, foliage and distribution","description":"Get one species' full record (by numeric ID or slug) including growth, specifications, flowers, foliage and distribution as sent by Trefle. Use for \"Give me the full record for the species rosa-canina\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"species_id":{"description":"Species numeric ID or slug, for example 'rosa-canina'.","maxLength":100,"title":"Species Id","type":"string"}},"required":["species_id"],"title":"get_speciesArguments","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_genus":{"post":{"operationId":"get_genus","summary":"Get one genus' record by slug. Use for \"What does Trefle say about the genus Rosa\".","description":"Get one genus' record by slug. Use for \"What does Trefle say about the genus Rosa\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"genus_slug":{"description":"Genus slug, for example 'rosa'.","maxLength":100,"title":"Genus Slug","type":"string"}},"required":["genus_slug"],"title":"get_genusArguments","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}}}}