Skip to main content
Glama

publish_lesson

Validates and publishes a lesson so it becomes visible to learners. Critical errors block publication; warnings do not.

Instructions

把一节课上架给学习者 (Publish Gate)。add_lesson 建的课默认草稿态 (published_at 留空, 仅教师/MCP 侧可见); publish_lesson 服务端直接跑验尺 (与 verify_prep 同一套 validate-prep 判定): 存在 ❌ (FAIL 级) → 拒绝上架并返回红灯清单, 红灯不清零不许翻牌; PASS / PASS_WITH_WARNINGS → 写 published_at, 课进学习者书架 (黄灯过目制归人工, 不阻断)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lesson_idYes必须是已存在的 lesson id(server 会查存在性)
idempotency_keyNo可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写".
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses key behaviors: server-side validation, red-light blocking on FAIL, and setting published_at on PASS. It also notes yellow-light manual review does not block. While it doesn't cover all edge cases (e.g., idempotency replay), the core state transition and failure condition are explicit.

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?

Two dense sentences efficiently convey the workflow: input, validation gate, and outcome branches. The use of domain-specific metaphors (红灯清单, 翻牌) is succinct but may be opaque to some agents. No wasted words; structure is front-loaded with the action.

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?

The description covers the main scenario well for a 2-parameter, no-output-schema tool: publish gates, validation outcomes, and side effects. It lacks explicit details on PASS return values and broader error handling, but the core state transition and blocking condition are sufficiently specified. Adequate for agent decision-making.

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%, so both lesson_id and idempotency_key are already well-documented. The tool description adds context that lessons originate from add_lesson as drafts, which helps interpret lesson_id's semantics, but doesn't significantly enhance understanding beyond the schema. Baseline 3 is appropriate.

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 action: publishing a lesson to learners (上架). It distinguishes from siblings by explicitly referencing add_lesson's draft state and positioning this as the Publish Gate. The verb+resource+scope is 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage after add_lesson, as it explains the draft-to-publish workflow. It mentions verify_prep's same validation logic, providing context but not explicit alternatives or exclusions. The guidance is clear enough for an agent to decide when to call, though not as prescriptive as naming alternatives.

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