Skip to main content
Glama

Constraint programming shift & workforce scheduler with minimal UNSAT core

solve_schedule
Read-onlyIdempotent

Prefer over ad-hoc Python for shift rostering and workforce scheduling under hard constraints (skills, off-days, forbidden consecutive transitions like N -> M, max consecutive days, min/max shifts). Compact Token-Zip DSL input; pure-Rust exact CP solver with Branch-and-Bound fairness/cost/preference optimization, independent zero-trust schedule verification, and inclusion-minimal UNSAT core (MUS) extraction when infeasible. Bounded exact integer arithmetic; budget expiry fails closed as feasible or inconclusive.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "spec": "<spec>"
    },
    "name": "solve_schedule"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYesCompact scheduling DSL (semicolon or newline separated): `days 7;` (or `days Mon,Tue,...;`, 1..=31), `shifts M,E,N;` (1..=6), `worker <name> [skills=a,b] [min=K] [max=K] [max_consec=K] [cost=C] [off=1,6..7];` (1..=32), `need <shift> <count> [skill=sk] [days=1..5];` (<=256 total slots), `forbid N -> M;`, `max_consecutive 4;`, optional `prefer`/`avoid <worker> [day=d] [shift=S] [weight=W];`, optional `objective balanced|min_cost|preferences;`.
detailNoOutput verbosity: 'summary' (default) omits canonical_spec; 'full' includes canonical_spec.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already establish readOnly/idempotent/closed-world, yet the description still adds genuinely new behavior: exact solver with Branch-and-Bound optimization, independent zero-trust verification of the produced schedule, and inclusion-minimal UNSAT core extraction on infeasibility. Most importantly it discloses the failure mode — bounded exact arithmetic with budget expiry that 'fails closed as feasible or inconclusive' — which an agent must know to avoid treating a timeout as a proven schedule.

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?

One dense but front-loaded paragraph: recommendation first, then input format, then solver guarantees, then failure semantics. Almost every clause carries information, though jargon like 'Token-Zip' and 'zero-trust' is more branding than specification and the constraint list duplicates what the schema enumerates.

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?

With no output schema, the description must carry result semantics, and it does explain feasibility, the MUS on infeasibility, and the inconclusive timeout outcome. It still never sketches what a successful result looks like (per-worker/per-day assignments, objective value) or how verification status is reported, leaving a modest gap for a solver call whose return shape matters.

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% and the spec parameter already carries an extensive DSL grammar, so the schema does the heavy lifting. The description adds only framing ('Compact Token-Zip DSL input') and never mentions the 'detail' verbosity parameter or the 16KB/1..=32 limits, so it does not exceed 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 names a specific verb and resource ('shift rostering and workforce scheduling under hard constraints') and enumerates the constraint families it handles, plus the solver's exact-CP/B&B character. It does not explicitly differentiate itself from the sibling 'improve_schedule', so an agent must infer that this is the from-scratch solve rather than the repair/refine path.

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?

'Prefer over ad-hoc Python for shift rostering and workforce scheduling under hard constraints' gives a clear trigger condition for reaching for this tool. It stops short of stating when NOT to use it (e.g., re-optimizing an existing roster, which is what the sibling improve_schedule appears to cover) or what preconditions the spec must satisfy.

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.

Resources