# Supplement — canonical payload contracts

Search dietary supplement products from a local NIH DSLD label dump (~200k US products). Ingredients link to the central compound master. Label data — not lab assays. Not medical advice. No live NIH API.

**Service id:** `supplement`  
**Docs:** [https://mcp.glc-rag.hu/guide/supplement](https://mcp.glc-rag.hu/guide/supplement)  
**Markdown docs:** [https://mcp.glc-rag.hu/guide/supplement.md](https://mcp.glc-rag.hu/guide/supplement.md)  
**MCP resource:** `docs://supplement/payload`

POST `https://mcp.glc-rag.hu/mcp`. Values below are **type slots** from the live input schema (e.g. `<string, required>`), not example data. Fill them from the user task.

RPC result wrapper: `result.structuredContent` is the object in **Output schema**. `result.isError` mirrors `structuredContent.is_error`.

## `supplement_resolve`

Resolve product name, brand, or barcode to DSLD product candidates.

**Required arguments:** `query`

**Request contract**

```json
{
  "jsonrpc": "2.0",
  "id": "<integer|string>",
  "method": "tools/call",
  "params": {
    "name": "supplement_resolve",
    "arguments": {
      "query": "<string, required, maxLength 200>",
      "limit": "<integer, optional, default 10, minimum 1, maximum 25>"
    }
  }
}
```

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "maxLength": 200
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 25,
      "default": 10
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
```

**Output schema** (`structuredContent` on success)

```json
{
  "type": "object",
  "properties": {
    "disclaimer": {
      "type": "string"
    },
    "query": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  },
  "additionalProperties": true,
  "required": [
    "query",
    "count",
    "results"
  ]
}
```

**Error object**

```json
{
  "type": "object",
  "required": [
    "error",
    "is_error"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "is_error": {
      "type": "boolean",
      "const": true
    }
  },
  "additionalProperties": true
}
```

## `supplement_lookup`

Lookup one product by product_id or dsld_id; returns full declared ingredient list with compound_id links.

**Required arguments:** _(none)_

**Request contract**

```json
{
  "jsonrpc": "2.0",
  "id": "<integer|string>",
  "method": "tools/call",
  "params": {
    "name": "supplement_lookup",
    "arguments": {
      "product_id": "<string, optional>",
      "dsld_id": "<string, optional>"
    }
  }
}
```

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string",
      "description": "e.g. supp:dsld:82118"
    },
    "dsld_id": {
      "type": "string",
      "description": "Numeric DSLD id"
    }
  },
  "additionalProperties": false
}
```

**Output schema** (`structuredContent` on success)

```json
{
  "type": "object",
  "properties": {
    "disclaimer": {
      "type": "string"
    },
    "found": {
      "type": "boolean"
    },
    "product": {
      "type": [
        "object",
        "null"
      ]
    }
  },
  "additionalProperties": true,
  "required": [
    "found"
  ]
}
```

**Error object**

```json
{
  "type": "object",
  "required": [
    "error",
    "is_error"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "is_error": {
      "type": "boolean",
      "const": true
    }
  },
  "additionalProperties": true
}
```

## `supplement_search_by_compound`

Find products that declare a hatóanyag (compound_id or name query).

**Required arguments:** _(none)_

**Request contract**

```json
{
  "jsonrpc": "2.0",
  "id": "<integer|string>",
  "method": "tools/call",
  "params": {
    "name": "supplement_search_by_compound",
    "arguments": {
      "compound_id": "<string, optional>",
      "query": "<string, optional, maxLength 200>",
      "limit": "<integer, optional, default 10, minimum 1, maximum 25>"
    }
  }
}
```

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "compound_id": {
      "type": "string"
    },
    "query": {
      "type": "string",
      "maxLength": 200
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 25,
      "default": 10
    }
  },
  "additionalProperties": false
}
```

**Output schema** (`structuredContent` on success)

```json
{
  "type": "object",
  "properties": {
    "disclaimer": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  },
  "additionalProperties": true,
  "required": [
    "count",
    "results"
  ]
}
```

**Error object**

```json
{
  "type": "object",
  "required": [
    "error",
    "is_error"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "is_error": {
      "type": "boolean",
      "const": true
    }
  },
  "additionalProperties": true
}
```

## `supplement_status`

Supplement DB counts, dump import runs, compound link coverage (free).

**Required arguments:** _(none)_

**Request contract**

```json
{
  "jsonrpc": "2.0",
  "id": "<integer|string>",
  "method": "tools/call",
  "params": {
    "name": "supplement_status",
    "arguments": {}
  }
}
```

**Input schema**

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

**Output schema** (`structuredContent` on success)

```json
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    }
  },
  "additionalProperties": true,
  "required": [
    "ok"
  ]
}
```

**Error object**

```json
{
  "type": "object",
  "required": [
    "error",
    "is_error"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "is_error": {
      "type": "boolean",
      "const": true
    }
  },
  "additionalProperties": true
}
```
