# Herbal

Local multi-source herbal knowledge: MeSH conditions plus EMA monographs, Dr. Duke ethnobotany, Wikidata, and WHO/NCCIH seeds linked to WFO taxa. Also plant active-constituent profiles (ranked markers, paginated compounds). Results ranked by evidence_grade (monograph before ethnobotanical). Every non-status response includes a medical disclaimer.

**Service id:** `herbal`  
**Version:** `0.3.0`  
**Status:** `available`

## Authentication

MCP endpoint: `https://mcp.glc-rag.hu/mcp` (streamable HTTP)

**Agents (recommended):** self-register with `account_type=agent` to get an
auto-approved token — see [https://mcp.glc-rag.hu/guide/agent](https://mcp.glc-rag.hu/guide/agent).

Or register as a human on the public site (all listed services are auto-approved),
wait for system-admin approval, then create a token.

```http
Authorization: Bearer mcp_...
```

Cursor `mcp.json` example:

```json
{
  "mcpServers": {
    "herbal": {
      "url": "https://mcp.glc-rag.hu/mcp",
      "headers": {
        "Authorization": "Bearer mcp_YOUR_TOKEN"
      }
    }
  }
}
```

## Tools

### `herbal_resolve_condition` — Resolve condition (English MeSH or short HU alias)

Resolve a short disease/symptom to MeSH candidates (hybrid FTS + vector). Query language: prefer English MeSH headings (Fatigue, Cough). Short Hungarian aliases OK (köhögés, fáradtság). Do not pass long sentences; split to a heading or short alias first.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Short condition/symptom. Best: English MeSH (Fatigue, Cough, Physical Endurance). Also: short HU alias (k\u00f6h\u00f6g\u00e9s, f\u00e1radts\u00e1g, energiahi\u00e1ny). Not a paragraph of symptoms.",
      "maxLength": 200
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 25,
      "default": 10
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "query": "cough"
}
```

```json
{
  "query": "Fatigue"
}
```

```json
{
  "query": "k\u00f6h\u00f6g\u00e9s"
}
```

```json
{
  "query": "f\u00e1radts\u00e1g"
}
```

### `herbal_search_by_condition` — Search herbal uses by MeSH condition

Find herbal preparations for a MeSH condition_id (preferred) or a short free-text query. Query language same as herbal_resolve_condition: English MeSH heading or short HU alias. Long HU/EN prose often misses; call herbal_resolve_condition first and pass condition_id. Sorted by evidence_grade (A–F); monograph before ethnobotanical.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "condition_id": {
      "type": "string",
      "description": "MeSH id, e.g. mesh:D003371"
    },
    "query": {
      "type": "string",
      "description": "Only if condition_id omitted. Short English MeSH or short HU alias \u2014 same rules as herbal_resolve_condition.",
      "maxLength": 200
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 25,
      "default": 10
    },
    "include_warnings": {
      "type": "boolean",
      "default": true,
      "description": "Include contraindicated / potentially_harmful rows"
    },
    "min_evidence_grade": {
      "type": "string",
      "description": "Only grades at least this strong (A best \u2026 F weakest)",
      "enum": [
        "A",
        "B",
        "C",
        "D",
        "E",
        "F"
      ]
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "ema",
          "duke",
          "wikidata",
          "who",
          "nccih"
        ]
      },
      "description": "Filter by source_system"
    }
  },
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "condition_id": "mesh:D003371"
}
```

```json
{
  "query": "cough",
  "limit": 10
}
```

```json
{
  "query": "f\u00e1radts\u00e1g",
  "min_evidence_grade": "D",
  "sources": [
    "ema",
    "who"
  ]
}
```

### `herbal_preparation_lookup`

Lookup one or more herbal preparations by preparation_id or wfo_id, including therapeutic relations, safety, and (by default) a ranked, paginated plant constituent profile.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "preparation_id": {
      "type": "string",
      "description": "e.g. prep:liquiritiae-radix"
    },
    "wfo_id": {
      "type": "string",
      "description": "WFO taxon id from plant service"
    },
    "include_constituents": {
      "type": "boolean",
      "default": true,
      "description": "Attach plant constituent profile when available"
    },
    "constituent_limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20,
      "description": "Max compounds to return (default 20). Use herbal_constituent_lookup to page."
    },
    "constituent_offset": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Offset into the ranked compound list"
    },
    "primary_only": {
      "type": "boolean",
      "default": false,
      "description": "Only curated/known marker compounds"
    },
    "min_confidence": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ],
      "description": "Drop dump rows below this confidence"
    },
    "include_quarantined": {
      "type": "boolean",
      "default": false,
      "description": "Include toxic-metal / obviously bad dump rows"
    },
    "constituent_sources": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "curated",
          "manual",
          "lotus",
          "cmaup",
          "npass",
          "duke_chem",
          "knapsack"
        ]
      },
      "description": "Filter constituent sources"
    }
  },
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "preparation_id": "prep:liquiritiae-radix"
}
```

```json
{
  "wfo_id": "wfo-0000240053"
}
```

```json
{
  "wfo_id": "wfo-0000240053",
  "include_constituents": false
}
```

### `herbal_constituent_lookup`

Lookup dump/curated active constituents for a plant by wfo_id (or preparation_id → wfo). Ranked, paginated. Not lab analysis.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "wfo_id": {
      "type": "string",
      "description": "WFO taxon id"
    },
    "preparation_id": {
      "type": "string",
      "description": "Resolve wfo_id from this preparation if wfo_id omitted"
    },
    "constituent_limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20,
      "description": "Max compounds to return (default 20). Use herbal_constituent_lookup to page."
    },
    "constituent_offset": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Offset into the ranked compound list"
    },
    "primary_only": {
      "type": "boolean",
      "default": false,
      "description": "Only curated/known marker compounds"
    },
    "min_confidence": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ],
      "description": "Drop dump rows below this confidence"
    },
    "include_quarantined": {
      "type": "boolean",
      "default": false,
      "description": "Include toxic-metal / obviously bad dump rows"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "curated",
          "manual",
          "lotus",
          "cmaup",
          "npass",
          "duke_chem",
          "knapsack"
        ]
      },
      "description": "Filter constituent sources"
    }
  },
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "wfo_id": "wfo-0000240053"
}
```

```json
{
  "preparation_id": "prep:liquiritiae-radix"
}
```

### `herbal_search_by_constituent` — Search plants by English/INN constituent name

Search plants by English/INN constituent name only (caffeine, citral, rosmarinic acid, salidroside). Not effect text. Not Hungarian (not szorongáscsökkentő). If count=0, retry the INN — do not retry a HU/EN effect phrase. Symptom sentences → herbal_resolve_condition, not this tool.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "English compound/INN name (caffeine, citral). Not a Hungarian paragraph.",
      "maxLength": 200
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 25,
      "default": 10
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "query": "citral"
}
```

```json
{
  "query": "caffeine"
}
```

```json
{
  "query": "rosmarinic acid",
  "limit": 5
}
```

### `herbal_status`

Herbal DB health, import versions, embedding and constituent-run counts (free).

**Input schema:**

```json
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

**Examples:**

```json
{}
```

## Usage notes

Query language: condition index is English MeSH. Prefer English headings (Fatigue, Cough, Insomnia). Short Hungarian symptom aliases work (köhögés, fáradtság, energiahiány) — do not send long HU/EN prose. If the user speaks Hungarian, translate to a short MeSH term or a short HU alias, then herbal_resolve_condition → herbal_search_by_condition (use the returned condition_id). Constituents: English/INN names (caffeine, citral, salidroside). Hungarian effect words are weakly indexed; empty result → retry INN. Plant Latin names via the plant service, then join on wfo_id. Optional min_evidence_grade / sources. Hatóanyag: herbal_constituent_lookup or herbal_search_by_constituent; also nested under herbal_preparation_lookup. MCP clients: re-run tools/list after initialize (do not cache herbal_search_by_constituent as effect-text search). herbal_status is free. Not medical advice.

## Errors / limits

Empty query → empty results. Unknown condition → empty. No constituent profile → found=false. DB unavailable → is_error. Invalid API key → platform 401.

## Agent discovery

- Agent registration: `https://mcp.glc-rag.hu/guide/agent`
- Markdown: `https://mcp.glc-rag.hu/guide/herbal.md`
- Index: `https://mcp.glc-rag.hu/llms.txt`
- MCP resource: `docs://herbal`
