Skip to main content
Glama

upsert_course_plan

Create or update a course plan and batch upsert lessons in one step. Manage plan details, target assignment, and lesson paper slots.

Instructions

建/改课程计划 + 批量 upsert 课次(一步到位)→ :9090。返回 {ok, plan_id, lesson_ids, view_url}。

计划 = 一段周期(如一个暑假)的课次编排蓝本;排课时按 lesson_seq 顺序自动绑到场次上。 🔴 R1a·S1:计划有归属——新建必传 target_type + target_id(BE 强校验对象存在且归我,缺传 400)。 🔴 PRD-B-101 契约平移:课次内容模型 = 专项卷位 paper_slots(替代旧 seg_template『段模板』)。 一课次 = N 张专项卷,每卷位可绑一张卷。旧字段 seg_template / default_seg_template 收到即报错拒绝 (不静默兼容,防两套字段并存漂移)。 参数: plan : {id?, name, target_type:'student|class', target_id:str(归属对象 id,🔴 新建必传), term_tag:'暑假|上学期|寒假|下学期', year:int, material_note?:str(素材说明,如「学而思 36 周书·挑题制」), default_paper_slots?:list(默认专项卷位模板,lesson 空则继承), status?:'0草稿|1启用|2归档'} —— 带 id = 改计划基本维,空 id = 新建。🔴 无 total_lessons(=课次数实时聚合)。 lessons : 课次列表,每个 dict:{id?(空=新增), lesson_seq:int, title, lesson_type:'0教学|1测试', tag?(自由标签,吃透课走这), source_ref?(素材源,如「学而思第10+11周」), thinking_action?(思维动作), layer_target?(层数目标,如 '2→3'), parent_copy?(家长版口语文案), kg_node_ids?:[str](课内同步锚的 biz_subject id), paper_slots?:list(本课次专项卷位模板,覆盖计划默认): [{slot_seq:int, name:str(必填非空), style:str, rules:str, note:str}] (🔴 绑定字段 paper_id/manual_ready 由服务端管,agent 写入通常只给 slot_seq/name/style/rules/note)}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planYes
lessonsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Discloses detailed behavioral traits: validation errors on missing fields, rejection of old fields, return format, and internal handling of binding fields. Since no annotations are provided, the description fully covers safety and mutability.

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?

The description is detailed and well-organized with bullet points and sections, but somewhat verbose. Each sentence adds value, but could be slightly more concise.

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?

Covers all aspects: purpose, parameters, return value, validation, constraints, and references to business rules. Given the complexity and lack of formal output schema, the description is complete.

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

Parameters5/5

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

Schema coverage is 0% but the description provides exhaustive details for both 'plan' and 'lessons' parameters, including nested structures, required fields, types, and constraints. Adds significant meaning beyond the bare schema.

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 performs 'create/modify course plan + batch upsert lessons in one step'. It uses specific verbs and resource, distinguishing it from siblings like 'get_plan_detail' or 'update_session'.

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?

Provides explicit prerequisites (required target_type and target_id for new plans), warns about deprecated fields being rejected, and explains the concept of plans. Lacks explicit 'when not to use' 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/RuntimeAll/teacher-mcp'

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