mcp-server-pp
v1.3.0MCP server for PharmaPendium data extraction — converts extraction results to XLSX, expands drug/concomitant rows, and uploads to Azure Blob Storage
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
save_extraction
Convert extraction results (JSON array of objects) into an XLSX file, upload it to Azure Blob Storage, and return a download URL. AE results are automatically renamed and reordered into the PharmaPendium AE delivery layout (FDAName, Subject, Sex, Age, Route, Dose, ...), so the key order used in json_data does not matter. Use this as the mandatory final step of every extraction. If the user provided corrections, comments, or new rules in this session, pass them in the notes parameter — they will be saved as a Notes sheet inside the XLSX for traceability. To apply a correction: update the json…
| Parameter | Type | Description |
|---|---|---|
json_data * | string | A JSON array of extraction result objects. Example: '[{"col1": "val1", "col2": 2}, ...]' |
file_name | string | Output filename (with or without .xlsx extension). Defaults to 'extraction_results'. |
notes | string | Optional. User corrections, comments, or new rules applied to this extraction. Saved as a Notes sheet in the XLSX. Example: 'User correction: row 3 dose changed from 10mg to 5mg. New rule: always use… |
schema | string | Optional output layout. 'auto' (default) detects AE data and writes the PharmaPendium AE delivery columns in their fixed order; 'ae' forces it; 'none' writes the columns exactly as they appear in json… |
expand_concomitants
Takes a JSON array of rows with 'Drug Name' and 'Concomitants' columns (read via the built-in Excel tool). The 'Concomitants' cell is parsed as CT-style free text: drugs separated by `;`, each entry shaped as 'Name (aliases), route, dose, dose_comment, duration'. For each input row, emits N+1 output rows by rotating each drug (title + concomitants) into the title slot: the promoted drug's parsed metadata populates 'Drug Name', 'Route', 'Dose/Concentration', 'Dose Comment', and 'Treatment Duration' columns, while the displaced drugs are re-serialized back into 'Concomitants' as CT free text. Al…
| Parameter | Type | Description |
|---|---|---|
json_data * | string | A JSON array of row objects read from the Excel file. Each object must have at least 'Drug Name' and 'Concomitants' keys. Example: '[{"Drug Name": "Aspirin", "Concomitants": "Ibuprofen, Warfarin"}, ..… |
file_name | string | Output filename (with or without .xlsx extension). Defaults to 'expanded_results'. |