Skip to main content
Glama

Single-section writer / 写单个章节

section_writer

Single-section writer / 写单个章节 | USE WHEN: the user wants only one section written (abstract / methods / discussion / introduction) | ALIASES: 写方法, 写讨论, 写摘要, 写引言, 单章, section, write one chapter | RETURNS: 该章节正文 + section(实际生成章节)+ section_requested(原请求值)+ lang + truncated(是否疑似被生成上限截断)+ truncation_note + char_count + ignored_…

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "section_writer"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNo调用方提供的真实数据(组方剂量、基线数值、统计结果等)。2026-12-04 前本字段未声明、被静默丢弃,模型因此自述「数据栏为 {}」;现在会原样注入 prompt。
langNo输出语言:zh | en,**默认 zh**(2026-12-04 前本参数不存在,传 lang=zh 被静默丢弃,五个章节一律输出英文)。
statsNo统计方法(如「两组 t 检验 + 多因素 logistic」)。
titleNo论文题目。与 topic 等价,**两者给一个即可**(都给则 title 优先)。
topicNo研究主题/题目(与 title 等价,两者都认;2026-12-01 起实现已收口到同一出口,只传 topic 也能出稿)。
designNo研究设计
paramsNo补充参数(自由键值对),会原样注入 prompt。
controlNo对照组定义(方法学必须交代清楚)。
resultsNo**仅 section=results 必填**:真实统计结果原文(N、效应量、95%CI、P 值)。结果章不允许模型造数字——不传则只返回占位骨架并标 degraded,绝不生成数字。
sectionNo要写的章节:abstract | methods | results | discussion | introduction(中文「摘要/方法/结果/讨论/引言」亦可)。不传默认 methods。传其它值会 400 并列出可选值(2026-12-01 前本字段不存在,端点硬编码 Methods,传「写结果章」也返回 Methods 且无任何提示)。
outcomesNo结局指标(主要 + 次要)。
max_charsNo期望正文长度提示(不保证实际等于该值)。
populationNo研究对象
sample_sizeNo样本量(写进方法学)。数字或数字字符串均可:120 与 "120" 都收(2026-12-01 前此处声明 integer 而实现只收字符串,按声明传数字必被 422 拒,已修)。
interventionNo干预措施(剂量/疗程/给药途径)。
continue_fromNo上一段已生成正文的尾部。用于**从断点续写**(应对输出长度上限),要求模型不重复已有内容。
stats_softwareNo统计软件名称+版本(作者的事实信息,平台不猜)。如「SPSS 26.0」「R 4.4.1」。传了会原样写进方法学;不传则正文留〔待补:统计软件名称与版本〕并由 compliance 报高危项(2026-12-05 外部评审点名「只写采用统计软件」)。
ethics_approvalNo伦理委员会名称+批件号。如「我院伦理委员会(批件号:KY2021-001)」「IACUC(批准号:2021-A012)」。不传则留〔待补:伦理批件号〕并报高危项(2026-12-05 外部评审点名「只有审查批准、无批件号」)。

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. Changed2 schema fields changed
    • addedInput schema / properties / ethics_approval
      Added value: +{
      +  "description": "伦理委员会名称+批件号。如「我院伦理委员会(批件号:KY2021-001)」「IACUC(批准号:2021-A012)」。不传则留〔待补:伦理批件号〕并报高危项(2026-12-05 外部评审点名「只有审查批准、无批件号」)。",
      +  "type": "string"
      +}
    • addedInput schema / properties / stats_software
      Added value: +{
      +  "description": "统计软件名称+版本(作者的事实信息,平台不猜)。如「SPSS 26.0」「R 4.4.1」。传了会原样写进方法学;不传则正文留〔待补:统计软件名称与版本〕并由 compliance 报高危项(2026-12-05 外部评审点名「只写采用统计软件」)。",
      +  "type": "string"
      +}
  3. Changed5 schema fields changed
    • addedInput schema / properties / continue_from
      Added value: +{
      +  "description": "上一段已生成正文的尾部。用于**从断点续写**(应对输出长度上限),要求模型不重复已有内容。",
      +  "type": "string"
      +}
    • addedInput schema / properties / data
      Added value: +{
      +  "description": "调用方提供的真实数据(组方剂量、基线数值、统计结果等)。2026-12-04 前本字段未声明、被静默丢弃,模型因此自述「数据栏为 {}」;现在会原样注入 prompt。",
      +  "type": "object"
      +}
    • addedInput schema / properties / lang
      Added value: +{
      +  "description": "输出语言:zh | en,**默认 zh**(2026-12-04 前本参数不存在,传 lang=zh 被静默丢弃,五个章节一律输出英文)。",
      +  "enum": [
      +    "zh",
      +    "en"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "description": "期望正文长度提示(不保证实际等于该值)。",
      +  "type": "integer"
      +}
    • addedInput schema / properties / params
      Added value: +{
      +  "description": "补充参数(自由键值对),会原样注入 prompt。",
      +  "type": "object"
      +}
  4. Changed7 schema fields changed
    • addedInput schema / properties / results
      Added value: +{
      +  "description": "**仅 section=results 必填**:真实统计结果原文(N、效应量、95%CI、P 值)。结果章不允许模型造数字——不传则只返回占位骨架并标 degraded,绝不生成数字。",
      +  "type": "string"
      +}
    • changedInput schema / properties / sample_size / description
      Previous value: -"样本量(写进方法学)。"New value: +"样本量(写进方法学)。数字或数字字符串均可:120 与 \"120\" 都收(2026-12-01 前此处声明 integer 而实现只收字符串,按声明传数字必被 422 拒,已修)。"
    • changedInput schema / properties / sample_size / type
      Previous value: -"integer"New value: +"string"
    • addedInput schema / properties / section
      Added value: +{
      +  "description": "要写的章节:abstract | methods | results | discussion | introduction(中文「摘要/方法/结果/讨论/引言」亦可)。不传默认 methods。传其它值会 400 并列出可选值(2026-12-01 前本字段不存在,端点硬编码 Methods,传「写结果章」也返回 Methods 且无任何提示)。",
      +  "type": "string"
      +}
    • changedInput schema / properties / title / description
      Previous value: -"论文题目"New value: +"论文题目。与 topic 等价,**两者给一个即可**(都给则 title 优先)。"
    • changedInput schema / properties / topic / description
      Previous value: -"研究主题/题目(与 title 等价,两者都认)。"New value: +"研究主题/题目(与 title 等价,两者都认;2026-12-01 起实现已收口到同一出口,只传 topic 也能出稿)。"
    • changedInput schema / required
      Previous value: -[
      -  "title"
      -]New value: +[]
  5. Changed8 schema fields changed
    • addedInput schema / properties / control
      Added value: +{
      +  "description": "对照组定义(方法学必须交代清楚)。",
      +  "type": "string"
      +}
    • addedInput schema / properties / intervention
      Added value: +{
      +  "description": "干预措施(剂量/疗程/给药途径)。",
      +  "type": "string"
      +}
    • removedInput schema / properties / main_outcome
      Removed value: -{
      -  "description": "主要结局",
      -  "type": "string"
      -}
    • addedInput schema / properties / outcomes
      Added value: +{
      +  "description": "结局指标(主要 + 次要)。",
      +  "type": "string"
      +}
    • addedInput schema / properties / sample_size
      Added value: +{
      +  "description": "样本量(写进方法学)。",
      +  "type": "integer"
      +}
    • removedInput schema / properties / section
      Removed value: -{
      -  "description": "章节:abstract/methods/discussion/intro",
      -  "type": "string"
      -}
    • addedInput schema / properties / stats
      Added value: +{
      +  "description": "统计方法(如「两组 t 检验 + 多因素 logistic」)。",
      +  "type": "string"
      +}
    • addedInput schema / properties / topic
      Added value: +{
      +  "description": "研究主题/题目(与 title 等价,两者都认)。",
      +  "type": "string"
      +}
  6. Added
  7. Removed
  8. Added
  9. Removed
  10. Added
  11. Removed
  12. Added
  13. Removed
  14. Added

TDQS

A4.1/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: results requires real statistics and otherwise returns a degraded placeholder skeleton with no fabricated numbers, output truncation is signalled via truncated/truncation_note, and continue_from enables resuming at an output-length break. Defaults (section=methods, lang=zh) and the 400-on-invalid-section behavior are also disclosed. The RETURNS list is cut off mid-token ('ignored_…'), so the response contract is only partly readable.

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?

Pipe-delimited sections (USE WHEN / ALIASES / RETURNS) are front-loaded and scannable, and the alias list is functional rather than filler. It loses a point because the RETURNS segment is truncated with an ellipsis, leaving an unreadable fragment in a prominent position.

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?

With an output schema present and full schema coverage, the definition covers the operationally critical points: the results-section data requirement, degradation behavior, truncation handling, and continuation. Minor gaps remain (unchanged since annotations already state non-idempotent and open-world), but an agent has what it needs to call this correctly.

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 description coverage is 100% and the per-parameter descriptions already explain defaults, equivalences (title vs topic), and the results-required rule. The description itself adds little parameter-level meaning beyond restating the section choices, so baseline 3 applies.

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?

States a specific verb+resource ('single-section writer / 写单个章节') and scopes it to exactly one section at a time, listing the concrete section types (abstract / methods / discussion / introduction). The 'only one section' framing lets an agent separate it from a full-draft writer without opening either schema.

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 only one section written' plus a multilingual alias list gives a clear trigger condition and matches how users actually phrase requests. There is no explicit when-not or named alternative (e.g. the full-draft sibling), so the routing decision is still left partly to inference.

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