| calculate_clinical_scoreA | Executes validated mathematical clinical risk calculators, renal clearance formulas, triage indices, and patient-specific dosage adjustments with ceiling caps using deterministic arithmetic. When to use: Calculating exact, non-hallucinated clinical risk scores, renal staging, physiological indices, or patient-specific dosage adjustments from discrete patient parameters.
When NOT to use: Acute emergency triage or symptom-based red-flag evaluation without discrete parameters (use check_red_flags instead). Drug-drug interaction or pharmacological contraindication screening (use check_drug_interactions instead). Mapping commercial trade brand names to generic entities (use normalize_terminology instead).
Parameter constraints & formats: Behavioral guarantees & return states: Pure deterministic arithmetic: Stateless in-memory execution; requires no API keys, credentials, or network auth, with zero rate limits. Physiological boundary validation: Parameters exceeding safe physiological limits trigger SafeCalculationRefusal (status='CALCULATION_REFUSED_SAFE_ABSTENTION') with clinical reason; unrecognized calculator_id safely returns an explicit error message without throwing uncaught exceptions. Output contract: Returns structured JSON with calculator_id, score, unit, interpretation_band, clinical_recommendation, guideline_citation, and warnings.
|
| check_red_flagsA | Evaluates a patient clinical consultation envelope against multi-layered safety guardrails, detecting acute life-threatening emergencies, critical drug-drug interactions, inter-skill treatment conflicts, and missing mandatory data. When to use: Screening clinical consultation envelopes for acute medical emergencies, vital sign decompensation, red flags, or contraindicated treatment plans.
When NOT to use: Computing specific numerical clinical risk scores like CHA2DS2-VA or eGFR (use calculate_clinical_score instead). Screening isolated medication lists without patient context (use check_drug_interactions instead). Redacting patient identifiers or personal health information (use scrub_phi instead). Managing longitudinal patient records or EHR persistence (use external FHIR/EHR systems instead).
Parameter constraints & formats: Behavioral guarantees & return states: Deterministic evaluation pipeline sequentially checking acute emergencies, critical DDIs, missing data, and treatment conflicts. Auth & limits: Fully local execution; requires no API keys, credentials, or network auth, with zero rate limits. Verdict outcomes: gate_status returns 'PASSED_PROCEED', 'SAFE_ABSTENTION_EMERGENCY_ESCALATION' (with immediate emergency redirection and contacts), or 'SAFE_ABSTENTION_DATA_DEFICIT'. Missing vitals safely trigger data deficit status without throwing uncaught exceptions.
|
| check_drug_interactionsA | Screens patient medication regimens for critical, contraindicated, or fatal drug-drug interactions (DDIs), automatically resolves regional trade brand names to generic INN entities, and evaluates demographic contraindications (pregnancy, pediatric, geriatric). When to use: Evaluating prescription combinations or medication lists for dangerous interactions, QT prolongation, bleeding risks, or pregnancy contraindications.
When NOT to use: Comprehensive clinical consultation triage with vital signs and symptom red flags (use check_red_flags instead). Translating single brand names without DDI screening (use normalize_terminology instead). Renal dosage adjustment or clinical clearance calculations (use calculate_clinical_score instead).
Parameter constraints & formats: Behavioral guarantees & return states: Deterministic pharmacological rule engine grounded in curated interaction databases; stateless with zero external network calls or patient storage. Auth & limits: Fully local execution; requires no API keys, credentials, or network auth, with zero rate limits. Severity stratification: Interactions are categorized as 'CONTRAINDICATED' (fatal or severe co-administration hazard), 'MAJOR' (serious risk requiring intervention), or 'MODERATE' (monitoring recommended), each paired with safe therapeutic alternatives. Error handling: Clean regimens return interactions_found_count=0; unrecognized brand names are reported in warnings without throwing exceptions.
|
| verify_evidenceA | Performs two-stage medical evidence verification: validates bibliographic citation existence and DOI authenticity, and verifies clinical claim entailment against authoritative guideline corpora with GRADE certainty scoring. When to use: Verifying whether a clinical assertion, guideline claim, or medical literature citation is authentic, guideline-concordant, and free of medical hallucination.
When NOT to use: Executing mathematical clinical calculators or risk algorithms (use calculate_clinical_score instead). Triage screening of patient acute emergency symptoms or vital signs (use check_red_flags instead). Redacting patient identifying data from clinical records (use scrub_phi instead).
Parameter constraints & formats: 'ref_id': Standardized guideline registry key formatted as '[ORGANIZATION][YEAR][TOPIC]' (e.g. 'ESC_2024_AF' for ESC atrial fibrillation, 'KDIGO_2021' for chronic kidney disease, 'AHA_2023_HF' for heart failure, 'BTS_2023_PNEUMONIA' for British Thoracic Society); cross-verified against curated bibliographic registry. 'claim': Natural language clinical statement, diagnostic assertion, or therapeutic recommendation (e.g. 'Oral anticoagulation is recommended for male patients with non-valvular AF and CHA2DS2-VA score >= 2'); parsed for entities, comparator thresholds, and direction of effect against source guideline text. 'patient_age_years': Patient age in years to evaluate age-stratified guideline applicability (e.g. pediatric <18 cutoffs in Schwartz vs adult >=18 in CKD-EPI); omitted evaluates general adult population. 'patient_is_pregnant': Flag indicating pregnancy status to activate teratogenicity checks and maternal-fetal clinical guideline boundaries.
Behavioral guarantees & return states: Pure deterministic offline cross-verification; executes in memory without network telemetry or data persistence. Auth & limits: Fully local execution; requires no API keys, credentials, or network auth, with zero rate limits. Return contract: Returns citation_metadata (ref_id, validity boolean, DOI, publication year) and claim_entailment (status 'SUPPORTED'|'REFUTED'|'UNVERIFIED', confidence 0.0-1.0, and GRADE certainty 'HIGH'|'MODERATE'|'LOW'|'VERY_LOW'). Error handling: Unrecognized ref_id or unverified citation safely returns valid=false and status='UNVERIFIED' without throwing uncaught exceptions.
|
| scrub_phiA | Scans clinical narratives and de-identifies Protected Health Information (PHI), masking HIPAA Safe Harbor 18 identifiers, Egyptian National IDs (14 digits), Saudi Iqama/National IDs (10 digits), Medical Record Numbers (MRN), phone numbers, and email addresses. When to use: Sanitizing patient narratives, consultation transcripts, or discharge summaries before logging, exporting, or passing to external models or public registries.
When NOT to use: Detecting adversarial prompt injections, jailbreaks, or security exploits (use scan_prompt_security instead). Calculating clinical risk scores or physiological parameters (use calculate_clinical_score or check_red_flags instead). Normalizing pharmaceutical brand names to generic entities (use normalize_terminology instead).
Parameter constraints & formats: 'text': Unstructured clinical narrative, progress note, or dialogue string (up to 500,000 characters) containing patient identifiers to mask.
Behavioral guarantees & return states: Non-LLM deterministic transformation running locally in memory using regex and Luhn checksum validation; requires no external APIs, credentials, or rate limits. Token substitution: Direct identifiers are replaced with standardized masking tokens ([NATIONAL_ID_REDACTED], [PHONE_REDACTED], [EMAIL_REDACTED], [MRN_REDACTED]) while preserving clinical timeline and context. Return contract: Returns scrubbed_text alongside audit_report (total_entities_detected and breakdown by type); stateless with zero disk logging or network leakage.
|
| scan_prompt_securityA | Analyzes untrusted user inputs, clinical prompts, or external dialogue for adversarial attacks, prompt injections, system jailbreaks, role-play overrides, and clinical guardrail bypass attempts. When to use: When NOT to use: Masking patient identifying data or HIPAA identifiers (use scrub_phi instead). Clinical emergency triage or medical symptom screening (use check_red_flags instead). Verifying medical evidence citations or guideline entailment (use verify_evidence instead).
Parameter constraints & formats: 'text': Free-text clinical dialogue, patient consultation prompt, or third-party agent message (up to 50,000 characters). Evaluated across 4 adversarial threat vectors: direct prompt injections ('ignore previous safety rules'), role-play jailbreak personas ('DAN', 'hypothetical unrestricted physician'), system prompt and secret exfiltration ('reveal system instructions'), and lethal dosage overrides (unauthorized dosage escalation, off-label prescription bypasses).
Behavioral guarantees & return states: Non-LLM deterministic inspection: Pure regex and token analysis running locally in memory without remote classifier APIs, credentials, or rate limits. Idempotent & non-destructive: Repeated scans on identical text return consistent reports without state mutation. Threat outcomes: Clean inputs return is_safe=true with violations=[]; detected attacks return is_safe=false with violations listing triggered attack categories. Empty or non-string inputs safely return is_safe=true without exceptions.
|
| normalize_terminologyA | Maps regional pharmaceutical trade brand names to standardized International Nonproprietary Names (INN), resolves primary pharmacological drug classes, and retrieves WHO Anatomical Therapeutic Chemical (ATC) codes. When to use: When NOT to use: Multi-drug interaction or pharmacological contraindication screening (use check_drug_interactions instead). Clinical consultation emergency triage or red-flag evaluation (use check_red_flags instead). Mathematical clinical risk score calculations (use calculate_clinical_score instead).
Parameter constraints & formats: Behavioral guarantees & return states: Non-LLM deterministic dictionary lookup: Grounded in offline curated WHO INN and ATC indices with zero external network calls, credentials, or rate limits. Idempotent & non-destructive: Resolving the same brand name repeatedly returns identical mappings without modifying state. Bounded response & error handling: Returns a single bounded JSON object without pagination; unrecognized brand names safely return matched=false and null entity fields without throwing uncaught exceptions.
|