Trefle
liveScienceBiologyGlobal plant database — 1M+ species, growth habit, edibility, distribution.
Tools
search_plantsrequired: querySearch plants by common or scientific name. Returns Trefle plant ID, scientific name, common name, family, image. Filter by edible flags.
queryreqstringFree-text queryedibleoptbooleanOnly ediblevegetableoptbooleanOnly vegetablespageoptnumber1-based pagepage_sizeoptnumber1-100Try it
get_plantrequired: plant_idFull plant record by Trefle ID. Returns scientific/common names, family, status, image, year, main species.
plant_idreqnumberTrefle plant IDTry it
search_speciesrequired: querySearch species (the rank below plants — some plants have multiple species). Returns Trefle species ID + scientific name.
queryreqstringFree-text querypageoptnumber1-based pagepage_sizeoptnumber1-100Try it
get_speciesrequired: species_idFull species record: growth habit, light/atmospheric humidity/soil requirements, edible / medicinal flags, distribution, images, sources.
species_idreqnumberTrefle species IDTry it
list_distributionsrequired: zoneNative or introduced distribution zones (TDWG WGSRPD codes — e.g., "NWY" = Norway, "CAL" = California). Returns species lists by zone.
zonereqstringTDWG zone codepageoptnumber1-based pagepage_sizeoptnumber1-100Try it
Test with curl
The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.
curl -X POST https://gateway.pipeworx.io/trefle/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'curl -X POST https://gateway.pipeworx.io/trefle/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_plants","arguments":{"query": "hello"}}}'Use with the SDK
Install @pipeworx/sdk to call tools from any TypeScript/Node project.
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("search_plants", {"query":"example"});// Or ask in plain English:
const answer = await px.ask("global plant database — 1m+ species, growth habit, edibility, distribution");