get_by_nutrition

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

Find fruits matching a nutritional range. Specify nutrient type (calories, sugar, fat, carbs, protein) and min/max values to filter results.

Parameters

NameTypeRequiredDescription
nutrientstringyesThe nutrient to filter by. One of: calories, sugar, fat, carbohydrates, protein.
minnumberyesMinimum value for the nutrient (inclusive).
maxnumberyesMaximum value for the nutrient (inclusive).

Example call

Arguments

{
  "nutrient": "calories",
  "min": 40,
  "max": 60
}

curl

curl -X POST https://gateway.pipeworx.io/fruityvice/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_by_nutrition","arguments":{"nutrient":"calories","min":40,"max":60}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('get_by_nutrition', {
  "nutrient": "calories",
  "min": 40,
  "max": 60
});

More examples

{
  "nutrient": "sugar",
  "min": 10,
  "max": 15
}

Response shape

Always returns: nutrient, min, max, count, fruits

FieldTypeDescription
nutrientstringThe nutrient type used for filtering
minnumberMinimum nutrient value for filtering
maxnumberMaximum nutrient value for filtering
countnumberNumber of fruits matching the criteria
fruitsarray
Full JSON Schema
{
  "type": "object",
  "properties": {
    "nutrient": {
      "type": "string",
      "description": "The nutrient type used for filtering"
    },
    "min": {
      "type": "number",
      "description": "Minimum nutrient value for filtering"
    },
    "max": {
      "type": "number",
      "description": "Maximum nutrient value for filtering"
    },
    "count": {
      "type": "number",
      "description": "Number of fruits matching the criteria"
    },
    "fruits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique identifier for the fruit"
          },
          "name": {
            "type": "string",
            "description": "Name of the fruit"
          },
          "family": {
            "type": "string",
            "description": "Plant family classification"
          },
          "genus": {
            "type": "string",
            "description": "Genus classification"
          },
          "order": {
            "type": "string",
            "description": "Order classification"
          },
          "nutritions": {
            "type": "object",
            "properties": {
              "calories": {
                "type": "number",
                "description": "Calories per 100g"
              },
              "fat": {
                "type": "number",
                "description": "Fat content per 100g in grams"
              },
              "sugar": {
                "type": "number",
                "description": "Sugar content per 100g in grams"
              },
              "carbohydrates": {
                "type": "number",
                "description": "Carbohydrates per 100g in grams"
              },
              "protein": {
                "type": "number",
                "description": "Protein content per 100g in grams"
              }
            },
            "required": [
              "calories",
              "fat",
              "sugar",
              "carbohydrates",
              "protein"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "family",
          "genus",
          "order",
          "nutritions"
        ]
      }
    }
  },
  "required": [
    "nutrient",
    "min",
    "max",
    "count",
    "fruits"
  ]
}

Connect

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

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

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026