Skip to main content
Glama
Renal Transtubular Potassium Gradient (TTKG) Skill

Renal Transtubular Potassium Gradient (TTKG) Skill

by Alpha-Park

Renal Transtubular Potassium Gradient (TTKG) Skill

License Python OpenClaw GenPark MCP

Renal Transtubular Potassium Gradient (TTKG) and Distal Tubular Secretion Evaluator based on nephrological electrolyte physiology.

flowchart TD
    A[Urine & Plasma Potassium + Osmolality] --> B[Check Validity: U_osm >= P_osm]
    B --> C[Compute TTKG = U_K * P_osm / P_K * U_osm]
    C --> D{Serum Potassium Level}
    D -- Hyperkalemia > 5.0 --> E{TTKG > 7.0?}
    E -- Yes --> F[Appropriate Aldosterone Secretion]
    E -- No --> G[Hypoaldosteronism / Type IV RTA]
    D -- Hypokalemia < 3.5 --> H{TTKG < 3.0?}
    H -- Yes --> I[Appropriate Extra-Renal K Loss]
    H -- No --> J[Inappropriate Renal K Wasting]

Features

  • Zero PIP Dependencies: Implemented strictly with Python Standard Library (math, json, sys, typing).

  • Physiological Verification: Automatically validates urine-to-plasma osmolality ratio and distal sodium delivery conditions.

  • Electrolyte Precision: Rigorous algorithmic discrimination between mineralocorticoid deficiency, excess, and extra-renal losses.

  • Dual Architecture: Native Python import and Model Context Protocol (MCP) JSON-RPC 2.0 stdio server.

Related MCP server: Personal Agent Hydration Osmolality Electrolyte MCP Server

Quickstart

python example_usage.py

License

Apache-2.0

Related MCP Connectors

Related MCP Servers