Skip to main content
Glama

create_course

Create a new course from scratch for a fresh topic, with optional contract linking and planned lesson count to define completion.

Instructions

新建一个 course. 零材料启动新主题时用——不需要挂靠已有 course. 可选 contract_id: 建课即履约——有现役合约时应携带, 建课成功后新课 id 会自动并入该合约的 covered_course_ids(等价紧接着调一次 update_contract_coverage, 这里省一刀)。contract_id 必须现役 (经 lib/currentContract 判定路径)且属于同一 pair, 否则拒绝建课(不留孤儿关联)。建课时问学习者的第一问——"一共几节"——落 planned_lesson_count(可选, 正整数)。定了它, complete_contract/get_context 的结业判定会多一道门槛: 已发布节数须够这个数才算课程完成; 留空(null)则 goal_completion_ready 恒为 false, 结业永不放行, 且事后无补录入口。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
contract_idNo可选——现役合约 id, 建课成功后自动并入其 covered_course_ids.
descriptionNo
generated_fromNoSourceRef[]
idempotency_keyNo可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写".
syllabus_versionNo
planned_lesson_countNo可选——这门课计划一共几节 (正整数)。建课时问学习者的第一问, 定了它会成为结业判定的节数门槛 (见 complete_contract)。留空则该课结业永不放行, 且事后无补录入口。
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses critical behaviors: contract validation (must be active and same pair, else rejected), auto-merge into covered_course_ids, and the exact impact of planned_lesson_count on completion determination, including the permanent 'no later entry' consequence when null. This is rich and non-obvious.

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?

Although a single dense paragraph, every sentence adds essential context: purpose, contract linking, validation, and completion logic. It is front-loaded with the primary action and structured logically. No wasted words.

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?

For a tool with no output schema and no annotations, the description covers all key operational aspects: when to use, side effects, validation rules, and follow-up consequences. It is complete enough for an agent to invoke correctly without ambiguity.

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?

The schema has moderate coverage (57%). The description adds significant meaning to contract_id (validation, auto-merge) and planned_lesson_count (completion threshold, null behavior). Other parameters like topic, description, and generated_from are not elaborated but are self-explanatory or covered by schema descriptions. The added semantics compensate for the gaps.

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 '新建一个 course' (create a new course) with added specificity about zero-material topics and no need to attach to an existing course. It distinguishes itself from sibling tools like update_contract_coverage by describing the auto-merge behavior and from add_lesson by focusing on course creation.

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?

Explicitly states when to use: '零材料启动新主题时' (when starting a new topic with zero materials). It also names an alternative: '等价紧接着调一次 update_contract_coverage' (equivalent to calling update_contract_coverage), making the choice clear.

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