# Drug — canonical payload contracts

Search drugs and actives from local dumps (DrugCentral, ChEMBL, DailyMed, FDA NDC/Drugs@FDA, UNII). Ingredients resolve to the central compound master. Query language: English/INN and US/EU brand names; indications in English (diabetes, not cukorbetegség). Not medical advice. No live regulatory APIs on the request path.

**Service id:** `drug`  
**Docs:** [https://mcp.glc-rag.hu/guide/drug](https://mcp.glc-rag.hu/guide/drug)  
**Markdown docs:** [https://mcp.glc-rag.hu/guide/drug.md](https://mcp.glc-rag.hu/guide/drug.md)  
**MCP resource:** `docs://drug/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`.

## `drug_resolve` — Resolve drug (INN or US/EU brand)

Resolve drug name, brand, or NDC to product candidates. Query language: INN or US/EU brand (metformin, glucophage). Hungarian brand/disease prose is weakly indexed — translate first.

query: INN or US/EU brand (not Hungarian prose).

**Required arguments:** `query`

**Request contract**

```json
{
  "jsonrpc": "2.0",
  "id": "<integer|string>",
  "method": "tools/call",
  "params": {
    "name": "drug_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,
      "description": "INN, US/EU brand, or identifier (metformin, glucophage, NDC). Not a Hungarian paragraph."
    },
    "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"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "query": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  },
  "additionalProperties": true,
  "required": [
    "disclaimer",
    "query",
    "count",
    "results"
  ]
}
```

**Error object**

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

## `drug_lookup`

Lookup one product by product_id (ingredients + indications + label sections).

**Required arguments:** `product_id`

**Request contract**

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

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string"
    }
  },
  "required": [
    "product_id"
  ],
  "additionalProperties": false
}
```

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

```json
{
  "type": "object",
  "properties": {
    "disclaimer": {
      "type": "string"
    },
    "sources": {
      "type": "array",
      "items": {
        "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
}
```

## `drug_search_by_compound` — Find products by English/INN active

Find products containing a compound_id or active-ingredient query. Query language: English/INN (metformin, caffeine). Not Hungarian names.

compound_id or English/INN active name.

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

**Request contract**

```json
{
  "jsonrpc": "2.0",
  "id": "<integer|string>",
  "method": "tools/call",
  "params": {
    "name": "drug_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,
      "description": "English/INN active name if compound_id omitted (metformin, caffeine)."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 25,
      "default": 10
    }
  },
  "additionalProperties": false
}
```

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

```json
{
  "type": "object",
  "properties": {
    "disclaimer": {
      "type": "string"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "compound_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "query": {
      "type": [
        "string",
        "null"
      ]
    },
    "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
}
```

## `drug_search_by_indication` — Search indications (English labels only)

Search indications / disease labels → compounds/products with evidence_kind. Query language: English labels only (diabetes, hypertension, type 2 diabetes). Hungarian (cukorbetegség, magas vérnyomás) will miss — translate first.

query: English indication label, not Hungarian.

**Required arguments:** `query`

**Request contract**

```json
{
  "jsonrpc": "2.0",
  "id": "<integer|string>",
  "method": "tools/call",
  "params": {
    "name": "drug_search_by_indication",
    "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,
      "description": "English indication/disease label (diabetes, hypertension). Not Hungarian."
    },
    "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"
    },
    "sources": {
      "type": "array",
      "items": {
        "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
}
```

## `drug_compound_card`

Drug-oriented compound card: IDs, phase, MOA, targets, top indications.

**Required arguments:** `compound_id`

**Request contract**

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

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "compound_id": {
      "type": "string"
    }
  },
  "required": [
    "compound_id"
  ],
  "additionalProperties": false
}
```

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

```json
{
  "type": "object",
  "properties": {
    "disclaimer": {
      "type": "string"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "found": {
      "type": "boolean"
    },
    "compound": {
      "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
}
```

## `drug_interactions`

Interaction text for a compound_id or product_id. DailyMed data are full label-section blobs (not structured pairwise edges); partner drugs appear inside description free text.

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

**Request contract**

```json
{
  "jsonrpc": "2.0",
  "id": "<integer|string>",
  "method": "tools/call",
  "params": {
    "name": "drug_interactions",
    "arguments": {
      "compound_id": "<string, optional>",
      "product_id": "<string, optional>",
      "limit": "<integer, optional, default 25, minimum 1, maximum 50>"
    }
  }
}
```

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "compound_id": {
      "type": "string"
    },
    "product_id": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 25
    }
  },
  "additionalProperties": false
}
```

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

```json
{
  "type": "object",
  "properties": {
    "disclaimer": {
      "type": "string"
    },
    "sources": {
      "type": "array",
      "items": {
        "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
}
```

## `drug_status`

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

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

**Request contract**

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

**Input schema**

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

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

```json
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "error": {
      "type": "string"
    },
    "is_error": {
      "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
}
```
