Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_diagnostic_sensitivity_specificity

Calculate diagnostic test sensitivity, specificity, PPV, NPV, and likelihood ratios from a 2×2 contingency table to evaluate clinical test performance.

Instructions

Clinical Diagnostic Test Sensitivity, Specificity & Predictive Value (PPV/NPV) Calculator. Calculate diagnostic Sensitivity, Specificity, Positive Predictive Value (PPV), Negative Predictive Value (NPV), and Likelihood Ratios from a 2×2 contingency table. Discipline: BIOTECH. Governing mathematical model / formula: Sensitivity = TP / (TP + FN) | Specificity = TN / (TN + FP) | PPV = TP / (TP + FP).

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for deterministic calculation of diagnostic_sensitivity_pct (Diagnostic Sensitivity), diagnostic_specificity_pct (Diagnostic Specificity), positive_predictive_value_ppv (Positive Predictive Value (PPV)), negative_predictive_value_npv (Negative Predictive Value (NPV)) using true_positives_tp (True Positives (TP) in cases), false_positives_fp (False Positives (FP) in cases), false_negatives_fn (False Negatives (FN) in cases), true_negatives_tn (True Negatives (TN) in cases). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.

  • WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.

  • SIBLING ROUTING: Use this dedicated specialist tool for 'Clinical Diagnostic Test Sensitivity, Specificity & Predictive Value (PPV/NPV) Calculator' rather than generic dispatchers like omni_universal_query. For cross-discipline dynamic dispatch, see omni_universal_query.

BEHAVIOR & SAFETY:

  • Pure deterministic computation with machine floating-point precision.

  • Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.

  • Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.

RETURNS:

  • Structured JSON object containing:

    • status (string): "success" on valid execution or "error" if validation fails

    • calculator (string): "diagnostic-sensitivity-specificity"

    • category (string): "biotech"

    • name (string): "Clinical Diagnostic Test Sensitivity, Specificity & Predictive Value (PPV/NPV) Calculator"

    • formula (string): Governing mathematical formula string

    • inputs (object): Echoed input parameter dictionary with applied defaults

    • metrics (object): Dictionary of computed outputs:

      • metrics.diagnostic_sensitivity_pct (Diagnostic Sensitivity): Formatted display string (e.g. '95.0% True Positive Rate')

      • metrics.diagnostic_specificity_pct (Diagnostic Specificity): Formatted display string (e.g. '98.9% True Negative Rate')

      • metrics.positive_predictive_value_ppv (Positive Predictive Value (PPV)): Formatted display string (e.g. '90.5% (Post-Test Probability)')

      • metrics.negative_predictive_value_npv (Negative Predictive Value (NPV)): Formatted display string (e.g. '99.4% Ruled Out')

    • execution_time_ms (number): Latency in milliseconds.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "omni_diagnostic_sensitivity_specificity"
  }
}

Input Schema

NameRequiredDescriptionDefault
true_negatives_tnNoTrue Negatives (TN) (cases). Healthy individuals correctly identified as negative. Default: 890. Min: 0. Max: 100000.
true_positives_tpNoTrue Positives (TP) (cases). Sick patients correctly identified by test as positive. Default: 95. Min: 0. Max: 10000.
false_negatives_fnNoFalse Negatives (FN) (cases). Sick patients incorrectly flagged as negative. Default: 5. Min: 0. Max: 10000.
false_positives_fpNoFalse Positives (FP) (cases). Healthy individuals incorrectly flagged as positive. Default: 10. Min: 0. Max: 10000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full disclosure burden and does it well: deterministic floating-point computation, read-only/idempotent/stateless with zero side effects, bounds validation, and graceful error status rather than thrown exceptions. It stops short of stating any caveats about degenerate inputs (e.g. zero denominators in PPV when TP+FP=0), which is the main behavioral risk for a ratio calculator.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded and sectioned (purpose, usage, behavior, returns), which aids scanning, but there is substantial redundancy: parameter names appear in the usage section, the schema, and the returns section, and the formula string is repeated. The RETURNS block is lengthy for a tool whose output is a small metrics dictionary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description compensates fully: it documents the response envelope (status, calculator, category, formula, inputs, metrics, execution_time_ms) and gives concrete output examples per metric. Error behavior and input validation are also covered, leaving nothing essential for correct invocation unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each of the four parameters already documented with clinical meaning, defaults, and min/max bounds. The description's usage section restates the same parameter names and labels without adding constraints or format guidance beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Calculate diagnostic Sensitivity, Specificity, PPV, NPV, and Likelihood Ratios from a 2×2 contingency table') and names the governing formulas, so an agent knows exactly what computation is performed. It is clearly distinguishable from the sibling rate calculators (e.g. omni_cap_rate_sensitivity) by the biotech/clinical-diagnostics domain and 2×2 table inputs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit WHEN TO USE enumerates the exact output metrics and input parameters, and WHEN NOT TO USE excludes qualitative/unquantified reasoning and non-numeric inputs. SIBLING ROUTING names the generic alternative (omni_universal_query) and states the condition that selects this tool instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools