a207-his-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@a207-his-mcpWhat's the nutrition ceiling for patient 003?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
a207-his-mcp
儿童慢性肾脏病(CKD)患者主数据 MCP 包(M1),模拟医院 HIS 患儿全量信息,供 CKDNutri 项目调度 Agent 与各业务子 Agent 锚定患儿身份与确诊事实。
本包为只读主数据源,不提供任何写入工具。分期以本服务返回的确诊值为准,调用方不得自行复算(MX-1 约束:营养师/家长助手命中分期词族时只读此处确诊值,不触发 M6 分期计算)。
五个工具
工具 | 说明 |
| 患儿档案:人口学、确诊分期、病因、透析方式、过敏史、医生营养上限。医生助手/风险预警/调度获全量视图(含 5 天饮食日记与跨月度生化);营养师视图不含生化;家长视图仅诊断、过敏与上限且必须携带 guardian_token |
| 医生确诊的 CKD 分期与透析方式,供营养师/家长助手替代分期复算 |
| 核验监护人与患儿绑定关系,家长助手每次访问患儿数据前必经此步 |
| 按条件(分期/透析/年龄带)筛选患儿清单,供联调与演示 |
| 医生设定的能量/蛋白/钾/磷/钠/液体上限,作为营养计算与食谱生成的硬约束 |
Related MCP server: ckd-meal-plan-mcp
调用方身份(P0-1)
调用方身份不再是工具入参,由部署侧通过环境变量 A207_CALLER 注入(取值见 a207_policy.CALLERS),
模型无法自证身份。未注入时所有工具 fail-closed 抛 CallerUnknown。放行集合统一取自 a207_policy
(HIS_READ / HIS_FULL_VIEW / HIS_LIMITED / HIS_BLOCKED / HIS_COHORT / HIS_ALLOWED_FILTER_KEYS),本包不再维护副本。
A207_CALLER=doctor_assistant python -m a207_his_mcp.server数据
data/patients.json:由data/generate.py确定性生成,覆盖 G2-G5 × HD/PD/非透析 × 各年龄带,36 例高拟真患儿,含 5 天食谱与跨月度生化。家长视图受限:A207_CALLER=parent_assistant 须携带 guardian_token,否则返回字段裁剪或拒绝。
目录结构
a207-his-mcp/
├── pyproject.toml
├── README.md
├── src/a207_his_mcp/
│ ├── __init__.py
│ ├── core.py # 纯逻辑(无 MCP/pydantic 依赖)
│ ├── server.py # FastMCP >=2 服务定义(5 个 @mcp.tool)
│ ├── models.py # pydantic v2 入参模型(extra=forbid)
│ └── data/patients.json
└── tests/test_tools.py设计约束
不依赖、不 import 任何其它领域
a207-*包(仅依赖统一策略包a207-policy)只读;A207_CALLER=child_companion 一律拒绝
错误以
{"ok": false, "error": ...}形式返回
运行与测试
# 编译(server.py/models.py 依赖 fastmcp/pydantic,仅做语法校验)
python -m py_compile src/a207_his_mcp/*.py
# 纯标准库自测(core 逻辑不依赖 fastmcp/pydantic,可独立运行)
python tests/test_tools.py返回非零退出码表示存在失败用例。
启动 MCP 服务
pip install -e .
python -m a207_his_mcp.server
# 或
fastmcp dev src/a207_his_mcp/server.py
# 或(已注册 console script)
uvx --from . a207-his-mcpAvailable Tools
5 toolsget_diagnosisB
读取医生确诊的 CKD 分期与透析方式,供营养师与家长助手替代分期复算。
| Name | Required | Description | Default |
|---|---|---|---|
| caller | Yes | ||
| patient_id | Yes | ||
| guardian_token | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries full burden for behavioral disclosure. The verb '读取' (read) is largely tautological with the tool name and does not reveal additional traits such as authorization requirements (e.g., guardian_token), error behavior, or whether the operation is safe. No annotations exist to supplement this.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that clearly states the purpose. It is concise, contains no filler, and is appropriately sized for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With three parameters, no annotations, and an output schema, the description still omits essential context about guard_token semantics and how this tool fits with siblings. The brevity leaves gaps in usage guidance and security model, making it incomplete despite the output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, and the description does not explain patient_id, caller, or guardian_token. The agent must guess parameter meanings from names alone, which is insufficient for correct invocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads the doctor-confirmed CKD stage and dialysis method, specifying the audience and purpose. It distinguishes itself from sibling tools like get_patient_profile and get_nutrition_ceiling by focusing on diagnosis data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context by stating it is intended for nutritionists and parent assistants to avoid re-calculating the stage, implying when to use it. However, it does not explicitly mention exclusions or compare with alternatives, so it falls just short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_nutrition_ceilingA
读取医生设定的能量/蛋白/钾/磷/钠/液体上限,作为营养计算与食谱生成的硬约束。
| Name | Required | Description | Default |
|---|---|---|---|
| caller | Yes | ||
| patient_id | Yes | ||
| guardian_token | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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 discloses that this is a read operation ('读取') and that the data represents doctor-set limits, which implies authority. However, it does not mention any auth prerequisites (e.g., guardian_token), behavior when data is missing, or rate limits, leaving some behavioral aspects undisclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence that front-loads the action and purpose. Every word adds value, with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only tool with an output schema, the description is largely complete. It states what is returned (the six limits) and why it matters (as constraints for nutrition/recipes). It lacks explicit mention of preconditions or error handling, but these are less critical given the tool's simplicity and the existence of an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description provides no parameter-level guidance. While parameter names like patient_id and caller are somewhat self-explanatory, guardian_token and the exact role of caller remain unexplained. The description adds nothing beyond what the schema already exposes, and does not compensate for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads doctor-defined upper limits for six specific nutrients and fluids, and it positions this as a hard constraint for nutrition calculation and recipe generation. This is a specific verb+resource combination that clearly distinguishes it from sibling tools like get_patient_profile or get_diagnosis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: the tool is to be used when performing nutrition calculations or generating recipes, where these limits act as hard constraints. It does not explicitly exclude other scenarios or name alternatives, but the usage context is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_patient_profileA
读取患儿档案:人口学、确诊分期、病因、透析方式、过敏史、医生营养上限。
医生助手/风险预警/调度获得全量视图(含 5 天饮食日记与跨月度生化); 营养师视图不含生化;家长视图仅诊断、过敏与上限,且必须携带 guardian_token。
| Name | Required | Description | Default |
|---|---|---|---|
| caller | Yes | ||
| patient_id | Yes | ||
| guardian_token | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the transparency burden. It discloses key behavioral traits: role-based data redaction (full view vs no biochemistry vs parent-limited), inclusion of 5-day diet diary and cross-month biochemistry in full view, and the mandatory guardian_token for parent access. This goes beyond typical descriptions and directly informs the agent of access-control behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: the first gives the purpose and core content in a compact list, the second details view variations. No fluff, all sentences carry information, and the key purpose is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given an output schema exists, return values are covered. The description explains the role-based view variations, which is essential for using this tool correctly. It also mentions the inclusion of diet diary and biochemistry in the full view, which are important contextual details not inferable from schema or annotations. The description is complete for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It explicitly explains that 'caller' determines the view and that 'guardian_token' is required for the parent view. Patient_id is not described but is self-evident from schema/name. This adds meaningful semantics for two of three parameters, but leaves patient_id implicit, so it is not a full compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a specific verb+resource: '读取患儿档案' (read patient profile) and enumerates the contained fields (demographics, diagnosis stage, etiology, dialysis modality, allergies, nutrition ceiling). This clearly distinguishes it from siblings like get_diagnosis (single diagnosis) or get_nutrition_ceiling (only the ceiling) by presenting the full profile scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides role-based context for when to use the tool, listing which callers (doctor assistant, risk warning, dispatch, nutritionist, parent) get which views and that parent view requires guardian_token. This is clear usage context but no explicit 'when not to use' or alternatives are named, so it does not fully meet the 'explicit when/when-not/alternatives' bar.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_patientsA
按年龄带/分期/透析方式等条件检索患儿队列,返回 id 列表与摘要。
| Name | Required | Description | Default |
|---|---|---|---|
| caller | No | orchestrator | |
| filter | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the core behavior (searching by conditions and returning id list + summary) but does not address potential caveats such as default behavior when filters are absent, pagination, authentication, or rate limits. This is a moderate level of transparency for a read-oriented list operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that immediately conveys the action, target, criteria, and output. Every word earns its place, with no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so the description need not detail return values. However, given the open-ended 'filter' object and lack of annotations, the description could provide more context on filter structure, pagination, or ordering. It is minimally sufficient but leaves several operational aspects unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It partially explains the 'filter' parameter by listing example attributes (age band, stage, dialysis modality), but it does not explain the 'caller' parameter or specify how the filter object should be structured. This leaves significant ambiguity for the agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: to search a pediatric patient cohort ('检索患儿队列') using criteria such as age band, stage, and dialysis modality, and to return a list of IDs with summaries. This distinguishes it from sibling tools that fetch individual profiles or perform verifications.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: use this tool when you need to retrieve a cohort of patients based on specific conditions like age band, stage, or dialysis modality. It does not explicitly mention alternatives or exclusion cases, but the context is clear enough for an agent to decide when to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_guardian_bindingA
核验监护人与患儿的绑定关系,家长助手每次访问患儿数据前必经此步。
| Name | Required | Description | Default |
|---|---|---|---|
| patient_id | Yes | ||
| guardian_token | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden of behavioral disclosure. It does add context about the tool being a mandatory gate before data access, which is a useful behavioral trait. However, it does not disclose what happens on success/failure, whether it is read-only, or any security/error behavior. This is a minimum viable level of transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys purpose and mandatory usage. It is front-loaded with the core verb and resource, and every word contributes meaning. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for a simple verification tool with an output schema, but it leaves gaps. It explains the tool's role as a prerequisite but does not mention failure behavior, return values, or exceptions. Given this is an access-control gate, understanding failure outcomes is important for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description provides no explanation of the parameters 'patient_id' and 'guardian_token'. While the parameter names are somewhat self-explanatory given the tool's purpose, the description does not clarify token format, source, or relationship to the verification process. This fails to compensate for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: verifying the binding relationship between guardian and patient. It uses a specific verb '核验' (verify) and names the resource, distinguishing it from sibling data-access tools. The additional context that it is mandatory before patient data access further clarifies its unique role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool: before every access to patient data by the parent assistant. This gives clear usage context but does not mention alternatives or exclusions. Since all siblings are data-access tools, it is implicit that this is the prerequisite step, but explicit when-not guidance is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
get_diagnosis - First observed
get_nutrition_ceiling - First observed
get_patient_profile - First observed
list_patients - First observed
verify_guardian_binding
TDQS
Scored across 5 tools
Tools have distinct names and purposes, but get_patient_profile overlaps with get_diagnosis and get_nutrition_ceiling by including diagnosis and nutrition limits in its data. While role-based views and descriptions help clarify intended usage, an agent could be uncertain whether to call the specialized getter or the full profile.
All tools follow a consistent verb_noun pattern with snake_case (get_patient_profile, get_diagnosis, verify_guardian_binding, list_patients, get_nutrition_ceiling). The verbs are predictable (get/list/verify) and resources are clearly named.
Five tools is well-scoped for a patient-data access server focused on read operations and authorization. Each tool serves a distinct function in the workflow, with no redundant or trivial tools.
The server covers core read workflows: patient lookup, detailed profile access, diagnosis verification, nutrition limits, and guardian authorization. Minor gaps exist, such as lacking a separate tool for labs or diet diary, but they are embedded in the profile, so agents can achieve their goals without dead ends.
Maintenance
Related MCP Connectors
MCP server for US nursing facility search and ownership lookup (NursingHomeDatabase).
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Read-only MCP server for searching Japan government procurement bid information from the KKJ portal.
MCP server exposing supplements database used by iNutriPlan.com
Related MCP Servers
- AlicenseAqualityCmaintenanceMock MCP server for pediatric CKD risk warning, enabling patient biochemical trend retrieval, deterministic risk rule evaluation, structured alert triggering, and clinical SOP lookup using simulated data.5MIT
- AlicenseAqualityBmaintenanceThis MCP server generates individualized meal plans for children with chronic kidney disease (CKD) based on KDIGO 2024/PRNT 2020/KRCP 2025 guidelines, incorporating patient age, CKD stage, allergies, dietary culture, and diet diary analysis. It provides deterministic nutrient computations and tools for meal plan generation, food database lookup, and risk analysis.13MIT
- FlicenseAqualityBmaintenanceMCP server for pediatric CKD lab data, providing lab panel queries, critical value alerts, trend analysis, and write operations with role-based permissions.5-
- FlicenseAqualityBmaintenanceMCP server for pediatric CKD nutrition and food calculations, enabling energy/protein targets, food nutrient lookup, substitutions, meal summaries, and drug-nutrient interaction checks.8-