lookup_ctcae
Retrieve NCI CTCAE grading criteria for an adverse event term to support oncology trial safety reporting.
Instructions
Look up NCI Common Terminology Criteria for Adverse Events (CTCAE) grading criteria for an adverse event. Essential for oncology clinical trial safety reporting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adverse_event | Yes | Adverse event term (e.g. 'neutropenia', 'nausea', 'peripheral neuropathy', 'QTc prolongation') |
Implementation Reference
- index.js:497-662 (registration)Tool registration for lookup_ctcae using server.tool() with name 'lookup_ctcae' and description about CTCAE grading lookup.
server.tool( "lookup_ctcae", "Look up NCI Common Terminology Criteria for Adverse Events (CTCAE) grading criteria for an adverse event. Essential for oncology clinical trial safety reporting.", { adverse_event: z .string() .describe("Adverse event term (e.g. 'neutropenia', 'nausea', 'peripheral neuropathy', 'QTc prolongation')"), }, async ({ adverse_event }) => { // Curated CTCAE v5.0 grading for most common oncology AEs const ctcae = { "neutropenia": { soc: "Investigations", grades: { 1: "ANC <LLN - 1500/mm³", 2: "ANC 1000 - <1500/mm³", 3: "ANC 500 - <1000/mm³", 4: "ANC <500/mm³", 5: "Death", }, notes: "ANC = Absolute Neutrophil Count. Grade 3/4 = dose-limiting toxicity in most protocols.", }, "nausea": { soc: "Gastrointestinal disorders", grades: { 1: "Loss of appetite without change in eating habits", 2: "Oral intake decreased without significant weight loss or dehydration", 3: "Inadequate oral caloric/fluid intake; tube feeding, TPN, or hospitalization indicated", }, notes: "No Grade 4 or 5 for nausea alone.", }, "vomiting": { soc: "Gastrointestinal disorders", grades: { 1: "1-2 episodes in 24 hours", 2: "3-5 episodes in 24 hours; IV fluids <24 hours", 3: "≥6 episodes in 24 hours; IV fluids ≥24 hours; hospitalization indicated", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, notes: "Distinguish from nausea — separate CTCAE terms.", }, "peripheral neuropathy": { soc: "Nervous system disorders", grades: { 1: "Asymptomatic; clinical or diagnostic observations only", 2: "Moderate symptoms; limiting instrumental ADL", 3: "Severe symptoms; limiting self-care ADL", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, notes: "Includes peripheral sensory and motor neuropathy — code to most specific term.", }, "fatigue": { soc: "General disorders and administration site conditions", grades: { 1: "Fatigue relieved by rest", 2: "Fatigue not relieved by rest; limiting instrumental ADL", 3: "Fatigue not relieved by rest; limiting self-care ADL", }, notes: "No Grade 4 or 5 for fatigue alone.", }, "diarrhea": { soc: "Gastrointestinal disorders", grades: { 1: "<4 stools/day over baseline; mild increase in ostomy output", 2: "4-6 stools/day over baseline; IV fluids <24 hours; not interfering with ADL", 3: "≥7 stools/day over baseline; IV fluids ≥24 hours; hospitalization; interfering with ADL", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, }, "qtc prolongation": { soc: "Cardiac disorders", grades: { 1: "QTc 450-480 ms", 2: "QTc 481-500 ms", 3: "QTc ≥501 ms on at least 2 separate ECGs", 4: "QTc ≥501 ms and/or >60 ms change from baseline; Torsade de pointes; ventricular fibrillation; urgent intervention indicated", 5: "Death", }, notes: "Use Fridericia formula (QTcF) unless protocol specifies otherwise.", }, "thrombocytopenia": { soc: "Blood and lymphatic system disorders", grades: { 1: "Platelets <LLN - 75,000/mm³", 2: "Platelets 50,000 - <75,000/mm³", 3: "Platelets 25,000 - <50,000/mm³", 4: "Platelets <25,000/mm³", 5: "Death", }, }, "hypertension": { soc: "Vascular disorders", grades: { 1: "Prehypertension (systolic 120-139 or diastolic 80-89 mmHg)", 2: "Stage 1 (systolic 140-159 or diastolic 90-99 mmHg); medical intervention indicated", 3: "Stage 2 (systolic ≥160 or diastolic ≥100 mmHg); medical intervention indicated", 4: "Life-threatening (malignant hypertension, transient or permanent neurologic deficit, hypertensive crisis)", 5: "Death", }, }, "alopecia": { soc: "Skin and subcutaneous tissue disorders", grades: { 1: "Hair loss of <50% of normal that is not obvious from a distance", 2: "Hair loss of ≥50% of normal; wig or hairpiece necessary", }, notes: "No Grade 3, 4, or 5 for alopecia.", }, }; const key = adverse_event.toLowerCase().trim(); const match = ctcae[key] || ctcae[Object.keys(ctcae).find(k => k.includes(key) || key.includes(k))]; if (!match) { const available = Object.keys(ctcae).map(k => k.charAt(0).toUpperCase() + k.slice(1) ).join(", "); return { content: [{ type: "text", text: [ `## CTCAE v5.0: "${adverse_event}"`, "", `_Term not found in curated index. Full CTCAE v5.0 available at:_`, `_https://ctep.cancer.gov/protocoldevelopment/electronic_applications/ctc.htm_`, "", `### Available in this server:`, available, ].join("\n") }] }; } const gradeRows = Object.entries(match.grades) .map(([g, def]) => `| Grade ${g} | ${def} |`) .join("\n"); const text = [ `## CTCAE v5.0: ${adverse_event.charAt(0).toUpperCase() + adverse_event.slice(1)}`, "", `**SOC:** ${match.soc}`, match.notes ? `**Note:** ${match.notes}` : "", "", `### Grading Criteria`, `| Grade | Definition |`, `|-------|------------|`, gradeRows, "", `### Grading Context`, `- **Grade 1:** Mild — asymptomatic or mild symptoms`, `- **Grade 2:** Moderate — minimal intervention indicated`, `- **Grade 3:** Severe — hospitalization or dose modification usually required`, `- **Grade 4:** Life-threatening — urgent intervention required`, `- **Grade 5:** Death related to AE`, "", `_Source: NCI CTCAE v5.0 (November 2017). Reference: ctep.cancer.gov_`, `_Used in oncology clinical trial protocols for adverse event severity grading._`, ].filter(Boolean).join("\n"); return { content: [{ type: "text", text }] }; } ); - index.js:500-504 (schema)Input schema defining the 'adverse_event' parameter as a zod string with description.
{ adverse_event: z .string() .describe("Adverse event term (e.g. 'neutropenia', 'nausea', 'peripheral neuropathy', 'QTc prolongation')"), }, - index.js:505-661 (handler)Async handler function implementing the CTCAE v5.0 grade lookup logic. Contains a curated dictionary of adverse events with grading criteria, fuzzy matching logic, and formatted markdown response.
async ({ adverse_event }) => { // Curated CTCAE v5.0 grading for most common oncology AEs const ctcae = { "neutropenia": { soc: "Investigations", grades: { 1: "ANC <LLN - 1500/mm³", 2: "ANC 1000 - <1500/mm³", 3: "ANC 500 - <1000/mm³", 4: "ANC <500/mm³", 5: "Death", }, notes: "ANC = Absolute Neutrophil Count. Grade 3/4 = dose-limiting toxicity in most protocols.", }, "nausea": { soc: "Gastrointestinal disorders", grades: { 1: "Loss of appetite without change in eating habits", 2: "Oral intake decreased without significant weight loss or dehydration", 3: "Inadequate oral caloric/fluid intake; tube feeding, TPN, or hospitalization indicated", }, notes: "No Grade 4 or 5 for nausea alone.", }, "vomiting": { soc: "Gastrointestinal disorders", grades: { 1: "1-2 episodes in 24 hours", 2: "3-5 episodes in 24 hours; IV fluids <24 hours", 3: "≥6 episodes in 24 hours; IV fluids ≥24 hours; hospitalization indicated", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, notes: "Distinguish from nausea — separate CTCAE terms.", }, "peripheral neuropathy": { soc: "Nervous system disorders", grades: { 1: "Asymptomatic; clinical or diagnostic observations only", 2: "Moderate symptoms; limiting instrumental ADL", 3: "Severe symptoms; limiting self-care ADL", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, notes: "Includes peripheral sensory and motor neuropathy — code to most specific term.", }, "fatigue": { soc: "General disorders and administration site conditions", grades: { 1: "Fatigue relieved by rest", 2: "Fatigue not relieved by rest; limiting instrumental ADL", 3: "Fatigue not relieved by rest; limiting self-care ADL", }, notes: "No Grade 4 or 5 for fatigue alone.", }, "diarrhea": { soc: "Gastrointestinal disorders", grades: { 1: "<4 stools/day over baseline; mild increase in ostomy output", 2: "4-6 stools/day over baseline; IV fluids <24 hours; not interfering with ADL", 3: "≥7 stools/day over baseline; IV fluids ≥24 hours; hospitalization; interfering with ADL", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, }, "qtc prolongation": { soc: "Cardiac disorders", grades: { 1: "QTc 450-480 ms", 2: "QTc 481-500 ms", 3: "QTc ≥501 ms on at least 2 separate ECGs", 4: "QTc ≥501 ms and/or >60 ms change from baseline; Torsade de pointes; ventricular fibrillation; urgent intervention indicated", 5: "Death", }, notes: "Use Fridericia formula (QTcF) unless protocol specifies otherwise.", }, "thrombocytopenia": { soc: "Blood and lymphatic system disorders", grades: { 1: "Platelets <LLN - 75,000/mm³", 2: "Platelets 50,000 - <75,000/mm³", 3: "Platelets 25,000 - <50,000/mm³", 4: "Platelets <25,000/mm³", 5: "Death", }, }, "hypertension": { soc: "Vascular disorders", grades: { 1: "Prehypertension (systolic 120-139 or diastolic 80-89 mmHg)", 2: "Stage 1 (systolic 140-159 or diastolic 90-99 mmHg); medical intervention indicated", 3: "Stage 2 (systolic ≥160 or diastolic ≥100 mmHg); medical intervention indicated", 4: "Life-threatening (malignant hypertension, transient or permanent neurologic deficit, hypertensive crisis)", 5: "Death", }, }, "alopecia": { soc: "Skin and subcutaneous tissue disorders", grades: { 1: "Hair loss of <50% of normal that is not obvious from a distance", 2: "Hair loss of ≥50% of normal; wig or hairpiece necessary", }, notes: "No Grade 3, 4, or 5 for alopecia.", }, }; const key = adverse_event.toLowerCase().trim(); const match = ctcae[key] || ctcae[Object.keys(ctcae).find(k => k.includes(key) || key.includes(k))]; if (!match) { const available = Object.keys(ctcae).map(k => k.charAt(0).toUpperCase() + k.slice(1) ).join(", "); return { content: [{ type: "text", text: [ `## CTCAE v5.0: "${adverse_event}"`, "", `_Term not found in curated index. Full CTCAE v5.0 available at:_`, `_https://ctep.cancer.gov/protocoldevelopment/electronic_applications/ctc.htm_`, "", `### Available in this server:`, available, ].join("\n") }] }; } const gradeRows = Object.entries(match.grades) .map(([g, def]) => `| Grade ${g} | ${def} |`) .join("\n"); const text = [ `## CTCAE v5.0: ${adverse_event.charAt(0).toUpperCase() + adverse_event.slice(1)}`, "", `**SOC:** ${match.soc}`, match.notes ? `**Note:** ${match.notes}` : "", "", `### Grading Criteria`, `| Grade | Definition |`, `|-------|------------|`, gradeRows, "", `### Grading Context`, `- **Grade 1:** Mild — asymptomatic or mild symptoms`, `- **Grade 2:** Moderate — minimal intervention indicated`, `- **Grade 3:** Severe — hospitalization or dose modification usually required`, `- **Grade 4:** Life-threatening — urgent intervention required`, `- **Grade 5:** Death related to AE`, "", `_Source: NCI CTCAE v5.0 (November 2017). Reference: ctep.cancer.gov_`, `_Used in oncology clinical trial protocols for adverse event severity grading._`, ].filter(Boolean).join("\n"); return { content: [{ type: "text", text }] }; } - index.js:507-608 (helper)Curated CTCAE v5.0 data dictionary containing 10 adverse events (neutropenia, nausea, vomiting, peripheral neuropathy, fatigue, diarrhea, QTc prolongation, thrombocytopenia, hypertension, alopecia) with SOC, grade definitions, and notes.
const ctcae = { "neutropenia": { soc: "Investigations", grades: { 1: "ANC <LLN - 1500/mm³", 2: "ANC 1000 - <1500/mm³", 3: "ANC 500 - <1000/mm³", 4: "ANC <500/mm³", 5: "Death", }, notes: "ANC = Absolute Neutrophil Count. Grade 3/4 = dose-limiting toxicity in most protocols.", }, "nausea": { soc: "Gastrointestinal disorders", grades: { 1: "Loss of appetite without change in eating habits", 2: "Oral intake decreased without significant weight loss or dehydration", 3: "Inadequate oral caloric/fluid intake; tube feeding, TPN, or hospitalization indicated", }, notes: "No Grade 4 or 5 for nausea alone.", }, "vomiting": { soc: "Gastrointestinal disorders", grades: { 1: "1-2 episodes in 24 hours", 2: "3-5 episodes in 24 hours; IV fluids <24 hours", 3: "≥6 episodes in 24 hours; IV fluids ≥24 hours; hospitalization indicated", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, notes: "Distinguish from nausea — separate CTCAE terms.", }, "peripheral neuropathy": { soc: "Nervous system disorders", grades: { 1: "Asymptomatic; clinical or diagnostic observations only", 2: "Moderate symptoms; limiting instrumental ADL", 3: "Severe symptoms; limiting self-care ADL", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, notes: "Includes peripheral sensory and motor neuropathy — code to most specific term.", }, "fatigue": { soc: "General disorders and administration site conditions", grades: { 1: "Fatigue relieved by rest", 2: "Fatigue not relieved by rest; limiting instrumental ADL", 3: "Fatigue not relieved by rest; limiting self-care ADL", }, notes: "No Grade 4 or 5 for fatigue alone.", }, "diarrhea": { soc: "Gastrointestinal disorders", grades: { 1: "<4 stools/day over baseline; mild increase in ostomy output", 2: "4-6 stools/day over baseline; IV fluids <24 hours; not interfering with ADL", 3: "≥7 stools/day over baseline; IV fluids ≥24 hours; hospitalization; interfering with ADL", 4: "Life-threatening; urgent intervention indicated", 5: "Death", }, }, "qtc prolongation": { soc: "Cardiac disorders", grades: { 1: "QTc 450-480 ms", 2: "QTc 481-500 ms", 3: "QTc ≥501 ms on at least 2 separate ECGs", 4: "QTc ≥501 ms and/or >60 ms change from baseline; Torsade de pointes; ventricular fibrillation; urgent intervention indicated", 5: "Death", }, notes: "Use Fridericia formula (QTcF) unless protocol specifies otherwise.", }, "thrombocytopenia": { soc: "Blood and lymphatic system disorders", grades: { 1: "Platelets <LLN - 75,000/mm³", 2: "Platelets 50,000 - <75,000/mm³", 3: "Platelets 25,000 - <50,000/mm³", 4: "Platelets <25,000/mm³", 5: "Death", }, }, "hypertension": { soc: "Vascular disorders", grades: { 1: "Prehypertension (systolic 120-139 or diastolic 80-89 mmHg)", 2: "Stage 1 (systolic 140-159 or diastolic 90-99 mmHg); medical intervention indicated", 3: "Stage 2 (systolic ≥160 or diastolic ≥100 mmHg); medical intervention indicated", 4: "Life-threatening (malignant hypertension, transient or permanent neurologic deficit, hypertensive crisis)", 5: "Death", }, }, "alopecia": { soc: "Skin and subcutaneous tissue disorders", grades: { 1: "Hair loss of <50% of normal that is not obvious from a distance", 2: "Hair loss of ≥50% of normal; wig or hairpiece necessary", }, notes: "No Grade 3, 4, or 5 for alopecia.", }, };