Skip to main content
Glama

add_lesson_patch

Add a teacher note or erratum to a lesson, preserving original text. Use teacher_note for lessons in progress, erratum for completed lessons.

Instructions

给一节课打老师注或勘误补丁 (§4 改课三律): 三律边界 — 未开始的课直接用 update_lesson 整改, 不要打补丁; 学习中的课 (学习者还没宣布已学完) 只许 kind=teacher_note (追加, 不抽换正文, 标注来源"基于你第X课的作业, 此处补一句"); 已学完的课 (学习者已宣布) 只许 kind=erratum (原文保留, 补丁并列, 永不重写课文本身)。判断学习中/已学完请先查这节课的 lesson_progress 状态 (GET /pairs/:pairId/lessons/:lessonId/progress)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes补丁正文, 非空
kindYesteacher_note=学习中的课追加注; erratum=已学完的课的勘误。二选一, 不是自由文本。
anchorNo可选——锚定页码或引用原文片段, 自由文本
lesson_idYes必须是已存在的 lesson id(server 会查存在性)
idempotency_keyNo可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写".
source_attributionNo可选——引用归因/批改依据, 例如 "基于你第X课的作业二"
Behavior5/5

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

With no annotations provided, the description carries the full burden of disclosing behavior, and it does so thoroughly. It states that teacher_note appends without replacing the body, and erratum keeps the original text while placing the patch alongside, never rewriting the lesson. This clearly communicates non-destructive side effects and the constraints on each patch kind.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense sentence but every clause carries essential information. It front-loads the purpose, then the three laws, then the progress-check directive. There is no redundancy or filler; it is efficient and well-structured.

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

Completeness5/5

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

Despite no output schema and no annotations, the description fully compensates. It covers the decision tree (unstarted/in-progress/completed), the appropriate patch kind for each state, the non-destructive behavior, and the prerequisite progress check. For a tool with six parameters and nuanced rules, this is remarkably complete.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds meaningful context beyond the schema by explaining when to use each kind (teacher_note vs erratum) based on lesson progress, and provides a concrete example for source_attribution. While not every parameter is elaborated, the added context for kind and source_attribution elevates the score.

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?

The description clearly states the tool's function: adding a teacher note or erratum patch to a lesson. It explicitly distinguishes from the sibling tool update_lesson, noting that unstarted lessons should be updated directly rather than patched. The verb 'add' and resource 'lesson patch' are specific and unambiguous.

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?

The description provides explicit when-to-use guidance: unstarted lessons should use update_lesson, in-progress lessons only allow teacher_note, and completed lessons only allow erratum. It even instructs the agent to check lesson_progress status before deciding, naming the exact endpoint. This is exemplary usage guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sf-shenfeng/learn-shell'

If you have feedback or need assistance with the MCP directory API, please join our Discord server