Skip to main content
Glama

Full research protocol generation / 完整研究方案 / 方案设计工具

design_protocol_generate
Read-onlyIdempotent

Full research protocol generation / 完整研究方案 / 方案设计工具 | USE WHEN: the user wants a complete research protocol including sample size, statistical plan and ethics points | ALIASES: 研究方案, 方案正文, 写方案, 方案生成, protocol, full protocol | RETURNS: 完整研究方案 JSON(14 段)或单项工具结构化结果;缺参时返回 needs_user_input 明确列出缺什么,不返回编造值

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tool_name": "<tool_name>"
    },
    "name": "design_protocol_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
p1No二分类结局:试验组预期发生率(0~1)
p2No二分类结局:对照组预期发生率(0~1)
alphaNo显著性水平,默认 0.05
powerNo检验效能,默认 0.80
topicNo研究选题(一句话)
budgetNo预算明细覆盖项,如 {"per_subject_cost": 8000, "personnel_cost": 200000}。不传按设计类型默认档(rct 12000/例、cohort 6000、case_control 5000)。
designNo研究设计类型(rct/cohort/case_control/cross_sectional/…)。它决定分组、样本量与预算的整套规则,传错会得到形式正确但口径不对的方案。
outcomeNoO:主要终点指标(如“28天病死率”“总生存期”“HbA1c 变化值”)
n_groupsNo分组数(整数,默认 2,范围 1~20)。与 design 一起决定样本量与预算分摊;多组时每组的对照调整会体现在样本量上。
n_centersNo参与中心数,默认 1
tool_nameYes工具名。推荐 full_proposal(一次输出完整方案)。可选:full_proposal / eligibility_criteria / intervention_detail / randomization / blinding_plan / bias_control / budget_gantt / sample_size_calc / spirit_check / compliance_check
comparisonNoC:对照措施(安慰剂/标准治疗/未暴露)
event_rateNo生存结局:观察期内事件发生率(0~1)
n_subjectsNo受试者例数(预算估算用;不填则用样本量计算结果)
populationNoP:目标人群(疾病/年龄/严重程度)
effect_sizeNo连续结局的标准化效应量 Cohen's d
dropout_rateNo预计脱落率,默认 0.10
hazard_ratioNo生存结局:预期风险比 HR(≠1)
interventionNoI:干预或暴露措施
outcome_typeNo主要终点数据类型:continuous / binary / time_to_event / count;不填按指标名自动识别
completed_stepsNospirit_check / compliance_check 用:已完成的方案步骤编号(1~9)
duration_monthsNo研究周期(月),默认 24
primary_timepointNo主要终点评价时点(如“治疗 12 周”)
secondary_outcomesNo次要终点,多个用分号分隔

Output Schema

NameRequiredDescriptionDefault
costNo
resultYes业务字段,键见 description 的 RETURNS 段
successYes
data_sourceYeslocal_computation|external_corpus|llm_generated|user_data|pending
engine_statusYesok|queued|error|unavailable|not_run

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "cost": {
      +      "type": "integer"
      +    },
      +    "data_source": {
      +      "description": "local_computation|external_corpus|llm_generated|user_data|pending",
      +      "type": "string"
      +    },
      +    "engine_status": {
      +      "description": "ok|queued|error|unavailable|not_run",
      +      "type": "string"
      +    },
      +    "result": {
      +      "additionalProperties": true,
      +      "description": "业务字段,键见 description 的 RETURNS 段",
      +      "type": "object"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "engine_status",
      +    "data_source",
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / budget
      Added value: +{
      +  "description": "预算明细覆盖项,如 {\"per_subject_cost\": 8000, \"personnel_cost\": 200000}。不传按设计类型默认档(rct 12000/例、cohort 6000、case_control 5000)。",
      +  "type": "object"
      +}
    • changedInput schema / properties / design / description
      Previous value: -"指定设计类型(rct/cohort/case_control/cross_sectional);不填则由 PICO 自动推荐"New value: +"研究设计类型(rct/cohort/case_control/cross_sectional/…)。它决定分组、样本量与预算的整套规则,传错会得到形式正确但口径不对的方案。"
    • changedInput schema / properties / n_groups / description
      Previous value: -"分组数,默认 2"New value: +"分组数(整数,默认 2,范围 1~20)。与 design 一起决定样本量与预算分摊;多组时每组的对照调整会体现在样本量上。"
  3. Added
  4. Removed
  5. Changed8 schema fields changed
    • addedInput schema / properties / duration_months
      Added value: +{
      +  "description": "研究周期(月),默认 24",
      +  "type": "integer"
      +}
    • addedInput schema / properties / n_centers
      Added value: +{
      +  "description": "参与中心数,默认 1",
      +  "type": "integer"
      +}
    • addedInput schema / properties / n_subjects
      Added value: +{
      +  "description": "受试者例数,默认 60",
      +  "type": "integer"
      +}
    • removedInput schema / properties / prompt
      Removed value: -{
      -  "description": "研究方案需求描述",
      -  "type": "string"
      -}
    • removedInput schema / properties / title
      Removed value: -{
      -  "description": "研究题目",
      -  "type": "string"
      -}
    • addedInput schema / properties / tool_name
      Added value: +{
      +  "description": "工具名,当前仅支持 budget_gantt",
      +  "type": "string"
      +}
    • removedInput schema / properties / type
      Removed value: -{
      -  "description": "研究类型",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "prompt"
      -]New value: +[
      +  "tool_name"
      +]
  6. Added
  7. Removed
  8. Added
  9. Removed
  10. Added
  11. Removed
  12. Added
  13. Removed
  14. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower, and the description still adds real behavior: it returns a 14-section JSON or a single-tool structured result, and returns needs_user_input listing the missing fields rather than fabricating values. That failure-mode disclosure is the most valuable part and materially affects retry logic.

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 USE WHEN / ALIASES / RETURNS scaffolding is front-loaded and scannable, with no filler prose. It loses a point for restating the title trivially at the start and for tri-lingual duplication of the same concept.

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?

For a 24-parameter generator with full schema coverage, a declared output schema, and helpful annotations, the description covers purpose, trigger, return shape, and missing-input behavior. The remaining gap is pipeline placement relative to design_type_decision and the proposal_* family, which an agent would have to guess.

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 coverage is 100% across 24 parameters, including defaults, enums, and the design/budget default tiers, so the schema carries nearly all meaning. The description adds no parameter-level guidance beyond a note about missing inputs; its most consequential hint (design drives grouping, sample size and budget) is already present in the schema text.

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

Purpose4/5

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

States a specific verb and resource ("Full research protocol generation") and enumerates the components it covers (sample size, statistical plan, ethics points), plus a bilingual alias list. It does not distinguish itself from the near-siblings design_type_decision, topic_research_plan, or proposal_create, so an agent cannot fully disambiguate from the description alone.

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?

"USE WHEN: the user wants a complete research protocol including sample size, statistical plan and ethics points" is an explicit, checkable trigger. However, no when-not condition or named alternative is given, so an agent must infer whether to start with design_type_decision or pico_refine first.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources