Trefle

liveScienceBiology

Global plant database — 1M+ species, growth habit, edibility, distribution.

5tools
0msauth
free tier50 calls/day

Tools

search_plantsrequired: query

Search plants by common or scientific name. Returns Trefle plant ID, scientific name, common name, family, image. Filter by edible flags.

Parameters
NameTypeDescription
queryreqstringFree-text query
edibleoptbooleanOnly edible
vegetableoptbooleanOnly vegetables
pageoptnumber1-based page
page_sizeoptnumber1-100
▶Try it
get_plantrequired: plant_id

Full plant record by Trefle ID. Returns scientific/common names, family, status, image, year, main species.

Parameters
NameTypeDescription
plant_idreqnumberTrefle plant ID
▶Try it
search_speciesrequired: query

Search species (the rank below plants — some plants have multiple species). Returns Trefle species ID + scientific name.

Parameters
NameTypeDescription
queryreqstringFree-text query
pageoptnumber1-based page
page_sizeoptnumber1-100
▶Try it
get_speciesrequired: species_id

Full species record: growth habit, light/atmospheric humidity/soil requirements, edible / medicinal flags, distribution, images, sources.

Parameters
NameTypeDescription
species_idreqnumberTrefle species ID
▶Try it
list_distributionsrequired: zone

Native or introduced distribution zones (TDWG WGSRPD codes — e.g., "NWY" = Norway, "CAL" = California). Returns species lists by zone.

Parameters
NameTypeDescription
zonereqstringTDWG zone code
pageoptnumber1-based page
page_sizeoptnumber1-100
▶Try it

Test with curl

The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.

List available tools
bash
curl -X POST https://gateway.pipeworx.io/trefle/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Call a tool
bash
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.

TypeScript
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("search_plants", {"query":"example"});
ask_pipeworx
// Or ask in plain English:
const answer = await px.ask("global plant database — 1m+ species, growth habit, edibility, distribution");