Skip to main content
Glama

GoldCoach

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; 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. First observed

TDQS

B3.2/5.0
Behavior4/5

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

Annotations are thin (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description compensates with real behavioral detail: one open/taken order per policy or playlist, done/dropped orders are never rewritten, 'take' can fail with taken=false plus a reason while a policy order is outstanding, 'release' returns an order to open without counting as done or dropped, and the in-use row keeps serving until a rebuild passes. What it does not cover is permission/auth requirements for the mutating actions beyond the main-key note, and nothing contradicts the annotations.

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 text is a dense wall of run-on sentences that mixes object definition, lifecycle rules, and three unrelated action families (orders, test sets, slot tasks) without headings or ordering; key operating facts are buried mid-paragraph. The content is substantive but poorly front-loaded and hard to scan for an agent selecting among 14 actions.

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 17-parameter, 14-action tool with no output schema, the description does substantial work: it explains the order lifecycle, the conditional failure mode of 'take', and it describes what 'tasks' returns (slot, row, field, span, kind, status, calls, tokens, history, counts by state) in lieu of an output schema. Minor gaps remain around post/residue/run_set side effects, but nothing essential to calling the common actions is missing.

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 every one of the 17 parameters is already documented with its paired action, including the action-specific notes. The description restates those pairings rather than adding new semantics such as ordering constraints between parameters or defaults beyond list's 50/500 limit, so the schema is doing the heavy lifting.

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

Purpose3/5

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

The opening sentence defines the domain object ('The rebuild orders the playlist store writes for the Queue's build job') rather than stating what the tool does for the caller; the actual verbs (list, take, finish, release, tasks) only emerge later in the prose. A reader can eventually infer this is a queue-management tool for rebuild orders, but there is no single front-loaded verb+resource statement and no explicit differentiation from siblings such as playlist_build_requests or playlist_review_queue.

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 gives per-action invocation conditions (take needs order_id; finish needs order_id and ending; release requires note) and states that run_* steps are answered only to main KSAserver's own key, which is useful routing. However, it never says when an agent should reach for this tool versus a sibling, nor any when-not-to-use guidance, so usage remains implied.

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.