add_document
Add a standalone Markdown document for learners to read, highlight, and generate flashcards. Derives title from frontmatter, first H1, or first line when omitted; supports idempotent retries.
Instructions
上架一份新文档 (Markdown) 供学习者阅读/划线/生成闪卡, 不挂靠任何 course/lesson. title 缺省时按 frontmatter title → 首个 H1 → 首行截断 自动派生 (brief §2). source 固定为 mcp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | 缺省时从 content_md 自动派生 | |
| content_md | Yes | ||
| idempotency_key | No | 可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写". |