Skip to main content
Glama

get_lesson_closure_state

Check lesson closure readiness: returns completed steps, missing items, next required action, and incorrect-review signal in one read-only call.

Instructions

关课前先调我——顺序、缺口、下一步和 id 都替你串好,不用脑内记账。只读, 复用 close_lesson_loop 同一份事实装配 (lib/lesson-closure-facts.ts), 不改动任何状态。返回 { lesson_id, state, completed[], missing[], next_required_action, incorrect_review_signal }。state 是"首个缺口的语义名"(graded/live_completed/live_evidence/live_evaluation/post_lesson_evaluation/reflection 之一), 或 ready_to_close(万事俱备只差调 close_lesson_loop), 或 closed(已关课, 终态)。读法警示: state 点名的是"当前卡在哪一项"——它指的是还欠着的待办, 不是已达成的成就, 所以 state=graded 时 missing[] 里同时出现 graded 是同一句话说了两遍, 不是矛盾; 已完成的项只看 completed[]。live_completed/live_evidence/live_evaluation 三项只在本课挂过 Live 时出现。next_required_action 是 {tool, pre_filled_refs} —— 能预填的 id (submission_id/session_id/live_session_id/lesson_id) 已经替你摘出来了, closed 时为 null。incorrect_review_signal (错题卡事实行) 是纯陈述, 不进 missing[], 不带 severity: {incorrect_submission_count, concepts_with_flashcard, concepts_total} —— 本课判错提交数, 以及这些判错习题涉及的概念里已经挂了闪卡的比例, 读读即可, 不是缺口, 不阻塞关课。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lesson_idYes必须是已存在的 lesson id(server 会查存在性)
Behavior5/5

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

没有 annotations 提供只读/破坏性提示,描述承担全部责任。它明确声明'只读、不改动任何状态',并详细披露了 state 的语义陷阱(state 是首个缺口而非已达成项)、Live 相关字段出现的条件、incorrect_review_signal 不参与阻塞关课等,远超最低要求,行为边界非常透明。

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?

信息密度很高,每句话都有实质内容,并且把最重要的一句话('关课前先调我')放在开头。但整体是一大段中文长句堆叠,没有使用列表或分段来分隔返回字段、状态语义、读法警示等不同主题,快速扫读时略显费力,因此扣 1 分。

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?

无输出 schema,描述必须承担解释返回值的责任。它完整覆盖了返回对象的所有字段(lesson_id、state、completed[]、missing[]、next_required_action、incorrect_review_signal),并解释了每个字段的取值含义、边界条件和 null 情况,对预检工具来说是闭环的。

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 对单个参数 lesson_id 已有 100% 覆盖('必须是已存在的 lesson id,server 会查存在性'),描述没有额外补充参数格式或约束。虽然描述中提到了预填 id 列表包含 lesson_id,但并未直接增强参数语义,因此给予高 schema 覆盖下的基线 3 分。

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?

描述开门见山指出工具是关课前的预检调用('关课前先调我'),并说明其作用是把顺序、缺口、下一步和 id 串好。同时明确与兄弟工具 close_lesson_loop 的关系:复用同一份事实装配但不改动状态,清晰区别于写操作工具,目的明确且具有辨识度。

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?

明确给出使用时机:关课前先调用;同时通过'只读'和'复用 close_lesson_loop 同一份事实装配'隐含了与写操作工具的替代关系,并说明 closed 状态时 next_required_action 为 null,帮助调用方理解何时无需再操作。虽未逐一列举其他替代工具,但对本工具的核心使用场景和边界交代充分。

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