Skip to main content
Glama
u9401066

Medical Calculator MCP Server

by u9401066

calculate

Run evidence-based medical scoring calculators by supplying a tool ID and clinical parameters. Returns numeric results, units, and clinical interpretation for decision support.

Instructions

🧮 通用醫學計算工具

使用指定的計算器執行計算。支援所有 75+ 種醫學計算器。

使用流程:

  1. 先用 discover(by="keyword" | "specialty" | "context") 找工具

  2. 用 get_tool_schema(tool_id) 查看需要的參數

  3. 呼叫 calculate(tool_id, params) 執行計算

嚴格規則:

  • 不要猜參數名稱,必須以 get_tool_schema() 回傳為準

  • 不要把 calculate 當搜尋工具;tool_id 不確定時先用 discover()

  • 如果回傳 guidance 或 param_template,先依該內容修正後再重試

Args: tool_id: 計算器 ID (例如: "sofa", "apache_ii", "ckd_epi_2021") params: 計算參數字典 (從 get_tool_schema 取得參數名稱)

Returns: 計算結果,包含: - success: 是否成功 - score_name: 評分名稱 - result: 計算結果 (分數或數值) - unit: 單位 - interpretation: 臨床解讀 - references: 參考文獻

Examples:

Example 1 - SOFA Score:

calculate("sofa_score", {
    "pao2_fio2_ratio": 300,
    "is_mechanically_ventilated": False,
    "platelets": 150,
    "bilirubin": 1.2,
    "map_value": 70,
    "gcs_score": 15,
    "creatinine": 1.0,
    "urine_output_24h": 1500
})

Example 2 - CKD-EPI 2021:

calculate("ckd_epi_2021", {
    "serum_creatinine": 1.2,
    "age": 65,
    "sex": "male"
})

Example 3 - RCRI (Revised Cardiac Risk Index):

calculate("rcri", {
    "high_risk_surgery": True,
    "ischemic_heart_disease": False,
    "heart_failure": False,
    "cerebrovascular_disease": False,
    "insulin_therapy": True,
    "creatinine_above_2": False
})

常用計算器:

  • Critical Care: sofa_score, apache_ii, news2_score, qsofa_score, glasgow_coma_scale

  • Cardiology: chads2_vasc, heart_score, rcri

  • Nephrology: ckd_epi_2021, kdigo_aki

  • Anesthesiology: asa_physical_status, mallampati_score, stop_bang

  • Hepatology: meld_score, child_pugh

⏮️ 上一步: get_tool_schema(tool_id) 查看完整參數說明

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes
tool_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.2

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It does so well by documenting the return contract (success, score_name, result, unit, interpretation, references), the validation stance ('不要猜參數名稱,必須以 get_tool_schema() 回傳為準'), and the error/retry pattern involving guidance and param_template. It stops short of a 5 because it doesn't address side effects, idempotency, or failure modes for invalid params, though these are less critical for a pure computation tool.

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

Conciseness4/5

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

The description is long but excellently structured: purpose first, then workflow, strict rules, args, returns, examples, and a reference list. Every section is high-value given the tool's complexity (opaque params, 75+ calculators, 0% schema coverage). It loses one point for minor redundancy (the footer '⏮️ 上一步' restates the workflow already covered in the usage steps), but the front-loading of purpose and rules is exemplary.

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?

Given the tool's high complexity — a dispatcher over 75+ calculators with fully opaque parameters and no annotations — the description is complete. It covers invocation workflow, input semantics with executable examples, output structure, retry guidance, and mapping of common tool_ids to specialties. An agent has everything needed to call this tool correctly without opening the schema, which is remarkable at 0% schema coverage.

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

Parameters5/5

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

Schema description coverage is 0% and the schema is nearly empty (tool_id as a bare string, params as an unconstrained object). The description fully compensates: it explains tool_id as a calculator ID with concrete examples ('sofa', 'apache_ii', 'ckd_epi_2021'), describes params as a dictionary sourced from get_tool_schema, provides three complete worked examples with exact parameter shapes, and lists common tool_ids by specialty.

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 states a specific verb and resource: '使用指定的計算器執行計算。支援所有 75+ 種醫學計算器' (execute calculations with the specified calculator, supporting 75+ medical calculators). It clearly differentiates from siblings by explicitly saying '不要把 calculate 當搜尋工具' (don't use calculate as a search tool), distinguishing it from discover and get_tool_schema.

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?

The description provides an explicit 3-step workflow (discover → get_tool_schema → calculate), names alternatives directly, and gives a hard exclusion rule: 'tool_id 不確定時先用 discover()' (use discover() first when tool_id is uncertain). It also specifies when to retry: '如果回傳 guidance 或 param_template,先依該內容修正後再重試'.

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