Skip to main content
Glama
u9401066

Medical Calculator MCP Server

by u9401066

calculate_batch

Run multiple medical calculators in one request and receive results with factual cross-analysis, reducing round-trips for multi-metric clinical assessments.

Instructions

🧮 批次計算多個工具 - 減少 round-trip,提高效率

一次執行多個計算,並提供結果間的事實關係分析。 適合需要同時評估多個指標的臨床情境。

Args: calculations: 計算請求列表,每個元素包含: - tool_id: 計算器 ID - params: 參數字典

Returns: - results: 各計算的結果 - summary: 結果摘要 - cross_analysis: 結果間的事實關係 (非臨床推理) - all_success: 是否全部成功

Example - Sepsis 評估:

calculate_batch([
    {"tool_id": "qsofa_score", "params": {
        "respiratory_rate": 24,
        "systolic_bp": 95,
        "altered_mentation": True
    }},
    {"tool_id": "sofa_score", "params": {
        "pao2_fio2_ratio": 200,
        "platelets": 80,
        "bilirubin": 2.5,
        "gcs_score": 13,
        "creatinine": 2.0
    }}
])

Cross-analysis 提供的事實判斷 (非推理):

  • "qSOFA ≥ 2 且 SOFA ≥ 2: 符合 Sepsis-3 定義標準"

  • "RCRI ≥ 2: 符合高心臟風險標準"

💡 這不是臨床建議,只是根據指引標準的事實陳述

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calculationsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.2

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does add useful behavioral context: cross_analysis is 'factual relationships, not clinical reasoning', it is 'not clinical advice', and all_success indicates whether all calculations succeeded. However, it does not clarify partial-failure behavior, independence of calculations, or whether the operation has any side effects.

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 well-structured with Args, Returns, Example, and Cross-analysis sections, and it front-loads the purpose. It is slightly repetitive around the 'non-clinical' disclaimer, but the example and return-field breakdown justify the length.

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

Completeness4/5

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

The description covers the input contract, return fields, an end-to-end example, and the nature of cross-analysis, which is enough for most calls. It leaves valid tool_id discovery to siblings such as find_tools_by_params and does not specify failure behavior, but the batch wrapper is intentionally generic and this is adequate.

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

Parameters4/5

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

The input schema is nearly empty (array of free-form objects, 0% coverage), so the description must compensate. It does so by explaining that each calculation has tool_id and params, and by providing a concrete sepsis example. It does not enumerate all valid tool_id values, but for a generic batch wrapper those are inherently open-ended.

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 '批次計算多個工具' and '一次執行多個計算', clearly stating that this tool executes multiple calculations in one call and provides cross-analysis. This distinguishes it from the sibling 'calculate' tool, which presumably handles a single calculation, and from discovery/schema tools.

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

Usage Guidelines4/5

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

The description says it is '適合需要同時評估多個指標的臨床情境', giving concrete context for when to use it. It does not explicitly state when not to use it or name the single-calculation alternative, but the batch-vs-single distinction is strongly implied.

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