Skip to main content
Glama

Moltline Optimize

Roster Shifts

roster_shifts
Read-onlyIdempotent

Assign staff to shifts under availability, skills, hour caps and rest gaps. PREMIUM (license).

Typical input {"staff": [{"id": "ana", "skills": ["till"], "max_hours": 40, "unavailable": ["sat-am"]}, ...], "shifts": [{"id": "sat-am", "start": "2026-09-12T08:00", "end": "2026-09-12T14:00", "required": 2, "skill": "till"}, ...], "rules": {"min_rest_hours": 11, "max_consecutive_days": 6}} returns {"assignments": [{"shift": "sat-am", "staff": ["ana", "ben"]}], "unfilled": [{"shift": "sun-pm", "short": 1}], "hours": {"ana": 30.0}, "solver_status": "OPTIMAL"}. The objective fills as many required slots as possible, then spreads hours evenly, then honours preferences (staff.prefer / staff.avoid shift ids). Use for weekly rotas of up to 60 staff and 150 shifts. Not a determination of labour-law compliance: the rules are the ones you pass. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "staff and shifts must be non-empty lists"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesNo{min_rest_hours (default 0), max_consecutive_days (default 7), max_shifts_per_day (default 1)}.
staffYes{id, skills[], max_hours, min_hours, unavailable[], prefer[], avoid[], max_shifts}.
shiftsYes{id, start, end (ISO 8601 local), required, skill, weight}.
time_limit_sNosolver time budget in seconds (default 10, max 60).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark the tool read-only and idempotent, and the description reinforces this with 'Every call is read-only and idempotent.' It also adds significant behavioral detail not in annotations: error handling never raises a protocol error, returns an error object, and the objective prioritization rules. This transparency is valuable for an optimization tool.

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 long but densely packed: purpose, example, objective, scale, limitations, error behavior, and safety all earn their place. It is front-loaded with the core purpose. The example is somewhat verbose but justified for a complex nested-input tool.

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?

Given the tool's complexity, the description covers scope, constraints, objective prioritization, failure behavior, and retry safety. The output example plus the presence of an output schema make the return contract clear. Nothing critical is missing for correct invocation.

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

Parameters4/5

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

The schema has 100% coverage, so baseline is 3. The description adds value beyond the schema with a complete typical input example, a returned output example, and clarification of preferences via 'staff.prefer / staff.avoid shift ids.' This helps the agent construct correct nested inputs.

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 specific verb and resource: 'Assign staff to shifts under availability, skills, hour caps and rest gaps.' It clearly identifies the tool's domain and distinguishes it from sibling optimization tools by focusing on shift rostering rather than routing, packing, or cutting.

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?

The description gives concrete usage context: 'Use for weekly rotas of up to 60 staff and 150 shifts' and explicitly warns it is not legal compliance advice. It does not name sibling alternatives, but the scope and example are strong enough for an agent to select this tool appropriately.

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.5/5.0
Disambiguation5/5

Each solver targets a distinct optimization domain (cutting, packing, routing, knapsack, rostering), and scale variants like pack_bins/pack_bins_large and route_plan/route_plan_fleet are explicitly differentiated by size/scope. Helper and meta tools (distance_matrix_haversine, validate_problem, explain_solution) are clearly separate from solve tools.

Naming Consistency4/5

Names are uniformly lowercase snake_case and organized into recognizable families such as cutting_stock_1d/2d, pack_bins/pack_bins_large, and route_plan/route_plan_fleet. The pattern is not strictly verb_object throughout—knapsack_select and distance_matrix_haversine are noun-first or descriptive—so there is minor inconsistency.

Tool Count5/5

With 11 tools, the server is well-scoped for an optimization toolkit: one core solver per problem type, a large-scale packer variant, a distance-matrix helper, and validation/explanation tools. Each tool has a clear role, and the count supports broad coverage without becoming bloated.

Completeness4/5

The server covers a complete solve-validate-explain workflow across major OR problem types—cutting, packing, routing, knapsack, and rostering. Minor gaps exist, such as pack_bins_large not being listed as recognized by explain_solution, and some features are explicitly documented exclusions rather than missing functionality.

Resources