Skip to main content
Glama

schedule_sessions

Batch schedule sessions for a student or class, detect conflicts, and optionally auto-bind unassigned lessons. Force store when conflicts are resolved.

Instructions

批量排课(给某对象铺一串场次)→ :9090。返回 {ok, created, conflicts}。

auto_bind=True 时按 lesson_seq 顺序把未排课次自动绑到这批场次上(items 里也可显式 plan_lesson_id)。 🔴 冲突处理(契约 D6):命中冲突且 force=False → 一条不落、只回 conflicts 明细; 前端弹警告后可 force=True 强存(重发同一批)。冲突口径:老师撞场(create_by 同人时间重叠)/学生撞场。 参数: target_type : 'student' | 'class' target_id : 对象 id(字符串) items : [{date:'YYYY-MM-DD', start:'HH:MM', end:'HH:MM', plan_lesson_id?:str, session_type?:'1正课|2测试|3外部占位', external_title?:str(外部占位标题), note?:str}] plan_id : 绑定的计划 id(auto_bind 用它取课次顺序) auto_bind : 按 lesson_seq 顺序自动绑未排课次(默认 True) force : True = 无视冲突强存(默认 False,先探冲突)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
itemsYes
plan_idNo
auto_bindNo
target_idYes
target_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/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 relevant behaviors: return object with ok/created/conflicts, conflict handling logic with force, auto_bind functionality, and the endpoint. It does not mention authentication or permissions, but covers main behavioral aspects well.

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 well-structured with a brief purpose statement followed by key behavioral notes and a bulleted parameter list. However, it includes some unnecessary details (e.g., ':9090' endpoint, '🔴 冲突处理(契约 D6)') that may distract. Overall, it is fairly efficient for the complexity involved.

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?

Given the tool's complexity (6 parameters, no annotations, no schema descriptions), the description covers inputs, behavioral nuances, and output format thoroughly. It lacks explicit prerequisites (e.g., target must exist) but is otherwise complete for agent decision-making.

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?

The input schema has 0% description coverage, so the description must fully explain all parameters. It does so exhaustively: target_type with enum values, target_id, items with nested fields (date, start, end, plan_lesson_id, session_type, external_title, note), plan_id, auto_bind, and force. Each parameter is clearly defined, adding significant value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it performs batch scheduling for a target (student or class), with a specific verb ('批量排课') and resource. It distinguishes from siblings like update_session, but does not explicitly differentiate from other scheduling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description provides some usage context: it explains when to use auto_bind and force for conflict handling, and mentions the return format. However, it does not explicitly compare to alternative tools (e.g., when to use this vs. update_session), making usage guidance implicit rather than explicit.

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