Skip to main content
Glama

solve_assignment_problem_tool

Optimize task assignments using the Hungarian algorithm. Input workers, tasks, and cost matrix to minimize or maximize costs. Specify constraints like max/min tasks per worker for tailored solutions.

Instructions

Solve assignment problem using OR-Tools Hungarian algorithm. Args: workers: List of worker names tasks: List of task names costs: 2D cost matrix where costs[i][j] is cost of assigning worker i to task j maximize: Whether to maximize instead of minimize (default: False) max_tasks_per_worker: Maximum tasks per worker (optional) min_tasks_per_worker: Minimum tasks per worker (optional) Returns: Dictionary with solution status, assignments, total cost, and execution time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costsYes
max_tasks_per_workerNo
maximizeNo
min_tasks_per_workerNo
tasksYes
workersYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dmitryanchikov/mcp-optimizer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server