search_plants

Pack: trefle · Endpoint: https://gateway.pipeworx.io/trefle/mcp

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

Parameters

NameTypeRequiredDescription
querystringyesFree-text query
ediblebooleannoOnly edible plants
vegetablebooleannoOnly vegetables
pagenumberno1-based page
page_sizenumberno1-100 (default 20)

Example call

Arguments

{
  "query": "tomato"
}

curl

curl -X POST https://gateway.pipeworx.io/trefle/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_plants","arguments":{"query":"tomato"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('search_plants', {
  "query": "tomato"
});

More examples

{
  "query": "rose",
  "edible": false,
  "page": 1,
  "page_size": 20
}

Response shape

Always returns: total, returned, plants

FieldTypeDescription
totalnumberTotal number of matching plants
returnednumberNumber of plants in this response
plantsarray
Full JSON Schema
{
  "type": "object",
  "properties": {
    "total": {
      "type": "number",
      "description": "Total number of matching plants"
    },
    "returned": {
      "type": "number",
      "description": "Number of plants in this response"
    },
    "plants": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "number",
              "null"
            ],
            "description": "Trefle plant ID"
          },
          "scientific_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Scientific name"
          },
          "common_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Common name"
          },
          "family": {
            "type": [
              "string",
              "null"
            ],
            "description": "Plant family"
          },
          "family_common_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Family common name"
          },
          "genus": {
            "type": [
              "string",
              "null"
            ],
            "description": "Genus"
          },
          "year": {
            "type": [
              "number",
              "null"
            ],
            "description": "Year of record"
          },
          "author": {
            "type": [
              "string",
              "null"
            ],
            "description": "Author"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Status"
          },
          "rank": {
            "type": [
              "string",
              "null"
            ],
            "description": "Taxonomic rank"
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image URL"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL slug"
          },
          "trefle_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Trefle API URL"
          }
        }
      }
    }
  },
  "required": [
    "total",
    "returned",
    "plants"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "trefle": {
      "url": "https://gateway.pipeworx.io/trefle/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026