Make balanced groups
make_groupsSplit people into balanced groups with a MILP solver and return each group's members, a per-group summary of every field, the overall mix, a balance score per field (100 = perfectly balanced), notes and warnings. Give groups (a number of groups; sizes then differ by at most 1) OR min_size and/or max_size (the server tries every group count that fits and picks the best); with both, groups decides and the sizes only validate it. priorities maps a field to 1 (most important), 2, 3...; a field left out counts least; equal numbers tie. Solves take up to about 20 s. If the result has status 'running', call get_group_result with its job_id. If it has status 'busy', wait the retry_after_seconds it gives and call again -- one call at a time, never in parallel. If it has status 'error' or 'infeasible', the message says in plain words what to change. Defaults applied (e.g. a field with no priority) are listed in assumptions; tell the user about them. Call get_group_example for a complete, realistic input.
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": "make_groups"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | One sentence, in the user's own words, of what they are trying to do (e.g. 'six mixed-ability reading groups for my class'). Optional; helps improve the tool. Do not put names in it. | |
| groups | No | Number of groups (max 60). | |
| people | No | The people to group (2-300). | |
| max_size | No | Largest allowed group size. | |
| min_size | No | Smallest allowed group size. | |
| priorities | No | Field name -> priority number (1 = most important). Each step is worth 4x the next; a field with no priority counts least. | |
| wait_seconds | No | How long to wait for the solve inside this call (default 25). |