Skip to main content
Glama

Playlist Rebuild Orders

playlist_rebuild_orders

The rebuild orders the playlist store writes for the Queue's build job. An order is written the moment a school's policy or a checklist's playlist is found stale (its pages or its catalog page differ from what is read now), when a stored playlist fails the current save check, and, when a school's policy passes its save and replaces the one in use, for every playlist built on the replaced policy. At most one order is open or taken per policy or playlist, and an order that ended done or dropped is not written again for the same row and reason. action list (the default) answers the orders, the oldest first, with an optional status (open, taken, done or dropped) and limit (default 50, at most 500). action take, with order_id, makes one open order taken; a playlist order waits, answered taken false with the reason, while its school's policy order is open or taken. action finish, with order_id and ending (done or dropped), ends a taken order, with the optional request_id that ran it and a note of what the build said. action release, with order_id and note, turns a taken order whose build was lost back to open, keeping the note in result_note; it is not ended, so it counts as neither done nor dropped. The row in use keeps serving until a rebuild passes its save and replaces it. [PLAYLIST_QUEUE_SLOT_TASKS, Q-Q6] action tasks answers a playlist's slot tasks: with checklist_id, those of its template-built playlist in use; with order_id, those an order's run last worked; with work_id, those of one copy, with that copy's own groups and items (copy); each task with its slot, row, field, span, kind, status, slot state, why, calls, tokens and history, and their count by state. An order run's own steps (run_copy, run_advance, run_close, slot_calls, slot_answer, policy_ladder, policy_values, run_passes) are answered only to main KSAserver's own key.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "playlist_rebuild_orders"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoWith run_advance: the task kind moved on
noteNoOptional with finish: what the build said. Required with release: why the order goes back to open
rowsNoWith run_copy and reopen rows: the row ids whose tasks are reopened
limitNoOptional, with list: how many orders to answer (default 50, at most 500)
skillNoWith post or residue: the fill skill that posted or hands over the residue
actionNolist (the default), take, finish or release; set answers the test set, the source checklists that govern the rebuild; run_set writes one test_set order for each checklist of the set that has none open or taken, rebuilt from its checklist whatever its last order ended; post, with skill and checklist_ids or element_id (and the optional undo_record), writes one database_post order for each checklist a fill skill posted to, or that links the shared element it posted to, each waiting for a publish that holds the post; residue, with skill, checklist_id and rows, writes one residue order that reopens those rows for the slot calls, whose checked answers are handed back on the tasks for the skill to post; tasks answers slot tasks; run_copy, run_advance and run_close are an order run's steps, main's key only
endingNoWith finish: done when the rebuild passed, dropped when it failed
reopenNoOptional, with run_copy: work the copy in use with only these tasks reopened
statusNoOptional, with list: only the orders with this status
work_idNoWith tasks, run_advance or run_close: the copy whose tasks are read or worked
order_idNoWith take, finish or release: the order
task_idsNoOptional, with run_advance: only these tasks
element_idNoOptional, with post: the shared award-level element the skill posted to; every checklist that links it is ordered
request_idNoOptional, with finish: the build request that ran the order
undo_recordNoOptional, with post: the undo record the skill wrote beside its post
checklist_idNoWith tasks: the checklist whose template-built playlist's tasks are answered. With run_copy or run_close: the checklist
checklist_idsNoWith post: the checklists whose rows the skill posted to

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"list (the default), take, finish or release; set answers the test set, the source checklists that govern the rebuild; run_set writes one test_set order for each checklist of the set that has none open or taken, rebuilt from its checklist whatever its last order ended; tasks answers slot tasks; run_copy, run_advance and run_close are an order run's steps, main's key only"New value: +"list (the default), take, finish or release; set answers the test set, the source checklists that govern the rebuild; run_set writes one test_set order for each checklist of the set that has none open or taken, rebuilt from its checklist whatever its last order ended; post, with skill and checklist_ids or element_id (and the optional undo_record), writes one database_post order for each checklist a fill skill posted to, or that links the shared element it posted to, each waiting for a publish that holds the post; residue, with skill, checklist_id and rows, writes one residue order that reopens those rows for the slot calls, whose checked answers are handed back on the tasks for the skill to post; tasks answers slot tasks; run_copy, run_advance and run_close are an order run's steps, main's key only"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "list",
      -  "take",
      -  "finish",
      -  "release",
      -  "set",
      -  "run_set",
      -  "tasks",
      -  "run_copy",
      -  "run_advance",
      -  "run_close",
      -  "slot_calls",
      -  "slot_answer",
      -  "policy_ladder",
      -  "policy_values",
      -  "run_passes"
      -]New value: +[
      +  "list",
      +  "take",
      +  "finish",
      +  "release",
      +  "set",
      +  "run_set",
      +  "post",
      +  "residue",
      +  "tasks",
      +  "run_copy",
      +  "run_advance",
      +  "run_close",
      +  "slot_calls",
      +  "slot_answer"
      +]
    • addedInput schema / properties / checklist_ids
      Added value: +{
      +  "description": "With post: the checklists whose rows the skill posted to",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / element_id
      Added value: +{
      +  "description": "Optional, with post: the shared award-level element the skill posted to; every checklist that links it is ordered",
      +  "type": "string"
      +}
    • addedInput schema / properties / skill
      Added value: +{
      +  "description": "With post or residue: the fill skill that posted or hands over the residue",
      +  "type": "string"
      +}
    • addedInput schema / properties / undo_record
      Added value: +{
      +  "description": "Optional, with post: the undo record the skill wrote beside its post",
      +  "type": "string"
      +}
  2. Changed8 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"list (the default), take, finish or release; set answers the test set, the source checklists that govern the rebuild; run_set writes one test_set order for each checklist of the set that has none open or taken, rebuilt from its checklist whatever its last order ended"New value: +"list (the default), take, finish or release; set answers the test set, the source checklists that govern the rebuild; run_set writes one test_set order for each checklist of the set that has none open or taken, rebuilt from its checklist whatever its last order ended; tasks answers slot tasks; run_copy, run_advance and run_close are an order run's steps, main's key only"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "list",
      -  "take",
      -  "finish",
      -  "release",
      -  "set",
      -  "run_set"
      -]New value: +[
      +  "list",
      +  "take",
      +  "finish",
      +  "release",
      +  "set",
      +  "run_set",
      +  "tasks",
      +  "run_copy",
      +  "run_advance",
      +  "run_close",
      +  "slot_calls",
      +  "slot_answer",
      +  "policy_ladder",
      +  "policy_values",
      +  "run_passes"
      +]
    • addedInput schema / properties / checklist_id
      Added value: +{
      +  "description": "With tasks: the checklist whose template-built playlist's tasks are answered. With run_copy or run_close: the checklist",
      +  "type": "string"
      +}
    • addedInput schema / properties / kind
      Added value: +{
      +  "description": "With run_advance: the task kind moved on",
      +  "enum": [
      +    "pattern",
      +    "policy",
      +    "slot_call",
      +    "convention",
      +    "close"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / reopen
      Added value: +{
      +  "description": "Optional, with run_copy: work the copy in use with only these tasks reopened",
      +  "enum": [
      +    "flagged",
      +    "b_tasks",
      +    "rows"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / rows
      Added value: +{
      +  "description": "With run_copy and reopen rows: the row ids whose tasks are reopened",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / task_ids
      Added value: +{
      +  "description": "Optional, with run_advance: only these tasks",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / work_id
      Added value: +{
      +  "description": "With tasks, run_advance or run_close: the copy whose tasks are read or worked",
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"list (the default), take, finish or release"New value: +"list (the default), take, finish or release; set answers the test set, the source checklists that govern the rebuild; run_set writes one test_set order for each checklist of the set that has none open or taken, rebuilt from its checklist whatever its last order ended"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "list",
      -  "take",
      -  "finish",
      -  "release"
      -]New value: +[
      +  "list",
      +  "take",
      +  "finish",
      +  "release",
      +  "set",
      +  "run_set"
      +]
  4. Changed4 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"list (the default), take or finish"New value: +"list (the default), take, finish or release"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "list",
      -  "take",
      -  "finish"
      -]New value: +[
      +  "list",
      +  "take",
      +  "finish",
      +  "release"
      +]
    • changedInput schema / properties / note / description
      Previous value: -"Optional, with finish: what the build said"New value: +"Optional with finish: what the build said. Required with release: why the order goes back to open"
    • changedInput schema / properties / order_id / description
      Previous value: -"With take or finish: the order"New value: +"With take, finish or release: the order"
  5. Added

TDQS

A3.7/5.0
Behavior5/5

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

The description discloses substantial behavior beyond the annotations: order creation triggers, the at-most-one-open-or-taken constraint per policy or playlist, the no-rewrite rule for ended orders, the wait condition for playlist orders, and the distinction between release and ending. These details give an agent rich context about state transitions and concurrency limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph with long, clause-heavy sentences. The core purpose is buried rather than front-loaded, and the action breakdown would be much easier to scan if structured with bullets or shorter sentences.

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?

For a complex tool with 17 parameters and no output schema, the description covers the action set, order lifecycle, and access restrictions well. It leaves some gaps around return values for actions like set, run_set, post, and residue, but overall it provides enough context to call the tool correctly.

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 coverage is 100%, so the schema already documents all 17 parameters. The description adds some meaning, such as list ordering ('oldest first') and action-parameter relationships, but much of its parameter explanation overlaps with the schema and does not deeply extend it.

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 opening sentence establishes that this tool deals with rebuild orders written for the Queue's build job, and the action breakdown makes the multi-action management purpose clear. It is specific but not crisply front-loaded as a single verb+resource statement, and it does not explicitly contrast with siblings like playlist_build_requests or playlist_build_run.

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 explains what each action does and includes access guidance for order-run steps, which implies when certain actions are used. However, it never states when to choose this tool over sibling tools or gives explicit when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.