Skip to main content
Glama

Set schedule rules

set_schedule_rules
DestructiveIdempotent

Give the channel a durable schedule: fixed slots ("news at 18:00") and dayparts ("no kids content after 22:00"). The scheduler re-honours these on EVERY rebuild, so you set them once instead of babysitting the grid. Pro tier or higher.

This REPLACES the entire ruleset — send every rule you want, not just new ones. Sending an empty array removes all rules and returns the channel to plain weighted-random. Validate first with validate_schedule_rules.

Rule shapes: time_slot {rule_type:'time_slot', start_time:'18:00', end_time?:'21:00', days_mask:127, selector_type:'asset'|'tag'|'playlist', selector_value:<id|tag|[ids]>, priority?:0} daypart_weight {rule_type:'daypart_weight', start_time:'22:00', end_time:'06:00', days_mask:127, selector_type:'asset'|'tag', selector_value:..., weight_multiplier:0-10}

days_mask is a bitmask: bit0=Mon … bit6=Sun. 127=daily, 31=Mon-Fri, 96=weekend. end_time on a time_slot makes it a BLOCK that keeps drawing from the selector until that time — that is how you get 'cartoons 06:00-09:00' rather than one cartoon. selector_type 'playlist' with an array of asset ids plays them IN ORDER. weight_multiplier 0 removes matching assets from that window entirely.

Set timezone (IANA) or the times mean UTC, which is almost never what the owner meant. Slots start ON-OR-AFTER their time: the programme running into a slot is never cut short, so an 18:00 slot may begin at 18:02. That is intended.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesYesThe COMPLETE ruleset. Empty array clears all rules.
timezoneNoIANA name, e.g. "Europe/Paris". Strongly recommended.
channel_idYes

TDQS

A5/5.0
Behavior5/5

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

The description goes far beyond annotations. It explains the durable re-honoring on EVERY rebuild, the replacement semantics, the empty-array removal, slot start behavior ('ON-OR-AFTER', never cutting short), block behavior via end_time, playlist ordering, and timezone defaulting to UTC. These are non-obvious behavioral traits that the annotations (destructiveHint, idempotentHint) do not fully capture.

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?

The description is long but every sentence carries critical operational information. It is structurally organized: intro, replacement warning, validation note, rule shape definitions, bitmask explanation, edge-case behaviors. There is no fluff or redundancy; the density is justified by the tool's complexity.

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 3 parameters and no output schema, the description covers all necessary invocation details: required params, full rule object semantics, days_mask encoding, timezone necessity, and behavioral edge cases. An agent has enough to correctly construct a call without guessing, and the absence of an output schema is acceptable since the tool's result is a straightforward success/error.

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 description adds rich meaning to every parameter beyond the schema. It details the two rule shapes with inline examples, defines days_mask as a bitmask with concrete values (127=daily, 31=Mon-Fri, 96=weekend), explains end_time's role in creating blocks, describes selector_type 'playlist' as ordered, and clarifies weight_multiplier 0 behavior. This compensates for the 67% schema coverage and is genuinely instructive.

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 opens with a clear verb+resource: 'Give the channel a durable schedule' with concrete examples ('news at 18:00', 'no kids content after 22:00'). It immediately differentiates from siblings like get_schedule_rules (read), validate_schedule_rules (check), and regenerate_schedule (rebuild), while stating the REPLACES behavior that defines this setter's unique role.

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?

Explicit prerequisites and workflow are provided: 'Validate first with validate_schedule_rules', 'Pro tier or higher', and the warning that sending an empty array clears all rules. It also tells the agent exactly how to frame the call ('send every rule you want, not just new ones') and when this is beneficial ('set them once instead of babysitting the grid').

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.

TDQS

A4.1/5.0
Disambiguation4/5

Most tools are clearly distinct: channel lifecycle (create/get/update/archive/list), asset management (import/delete/list/set_asset_weight), schedule management (get/set/validate/regenerate), and transcode (get status/retry). Minor overlap exists between archive_channel and delete_asset, but descriptions clarify the scope (whole channel vs single video). import_video_from_url and import_youtube_video are distinct in source and ownership requirements.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: archive_channel, create_channel, delete_asset, get_channel, list_assets, set_asset_weight, validate_schedule_rules, etc. Verbs are action-oriented (create, get, list, update, archive, delete, import, set, regenerate, retry) and nouns are resource names (channel, asset, schedule, transcode). No mixed conventions or vague verbs like 'process' or 'do_thing'.

Tool Count5/5

19 tools is well-scoped for a TV channel management server covering channel lifecycle, asset ingestion, scheduling, and transcode monitoring. Each tool addresses a distinct need and the count feels proportional to the complexity of managing a 24/7 linear TV channel. Not bloated with redundant tools, and each has a clear purpose.

Completeness4/5

The surface covers the core domain comprehensively: channel CRUD (create, get, update, archive, list), asset management (import, delete, list, weight), scheduling (set rules, validate, regenerate, get schedule), and transcode monitoring (status, retry). Minor gaps: no direct way to upload local files (stated as a limitation), no channel deletion (only archive), and no ability to manage playlists explicitly. However, these are acknowledged design constraints or edge cases, so the surface is largely complete for the stated purpose.

Resources