Skip to main content
Glama

draft_chapter_with_engine

Automatically retrieve evidence and draft a specified report chapter using a locally configured OpenAI-compatible LLM, offloading long engineering sections to a backend model.

Instructions

(可选自带 Key 工具)使用本地引擎配置的 OpenAI 兼容大模型(如环境变量 DEEPSEEK_API_KEY)直接自动检索并撰写指定章节。

适用场景:当宿主 Agent 希望将超长单章(如 5000~8000 字工程技术章节)卸载给后台高性价比模型(如 DeepSeek)生成时调用。
若未配置 DEEPSEEK_API_KEY / OPENAI_API_KEY,请优先使用 retrieve_report_evidence + 宿主自身大模型直接撰写。

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": {
      "report_type": "<report_type>",
      "outline_md": "<outline_md>",
      "chapter_seq": "<chapter_seq>",
      "chapter_title": "<chapter_title>",
      "topic": "<topic>"
    },
    "name": "draft_chapter_with_engine"
  }
}

Input Schema

NameRequiredDescriptionDefault
topicYes
projectNo
outline_mdYes
chapter_seqYes
include_webNo
report_typeYes
writing_hintNo
chapter_titleYes
predecessor_chaptersNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose one genuinely important behavioral fact: the tool depends on a locally configured API key and will not work without it. It also signals a cost/latency tradeoff (卸载给后台高性价比模型) and that retrieval happens automatically. It does not say whether the generated chapter is persisted/overwritten, what happens to an existing draft, how long the call takes, or whether it is safe to retry.

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?

Three short blocks, front-loaded with the mechanism and followed by the usage scenario and the fallback, with no filler sentences. The leading '(可选自带 Key 工具)' parenthetical is slightly cryptic but is resolved by the later key-name sentence.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the description covers purpose, prerequisites, and the fallback route. But for a 9-parameter generative tool with zero annotation coverage and zero schema descriptions, the absence of any explanation of the required inputs (outline_md, chapter_seq, report_type, topic) leaves the agent guessing how to construct a valid call.

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

Parameters2/5

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

Schema description coverage is 0% across 9 parameters, so the schema supplies essentially no meaning for report_type, outline_md, chapter_seq, chapter_title, topic, project, writing_hint, predecessor_chapters, or include_web. The description only indirectly touches two of them (the target chapter and the fact that retrieval, i.e. include_web, happens automatically), leaving the required/predecessor/outline fields completely unexplained.

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?

The description names a specific verb pair (自动检索并撰写) and a specific resource (指定章节) plus the mechanism (本地引擎配置的 OpenAI 兼容大模型), so the agent knows exactly what will be produced. It partially distinguishes itself from siblings by naming retrieve_report_evidence as the fallback path, but does not clarify its relationship to get_report_blueprint or the export/verify tools that presumably consume the chapter.

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?

It gives an explicit when-to-use condition (offloading an over-long single chapter, e.g. 5000~8000 字工程技术章节, to a cheap background model) and an explicit when-not condition (no DEEPSEEK_API_KEY / OPENAI_API_KEY configured), along with the concrete alternative of retrieve_report_evidence plus the host model. That is the full when/when-not/alternative triad the dimension asks for.

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