Skip to main content
Glama

solve_assignment_problem_tool

Solve assignment problems by matching workers to tasks using the Hungarian algorithm, minimizing or maximizing total cost. Supports constraints on tasks per worker.

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
workersYes
tasksYes
costsYes
maximizeNo
max_tasks_per_workerNo
min_tasks_per_workerNo
Behavior3/5

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

The description explains the tool solves the assignment problem and returns a dictionary with solution details. However, it does not disclose behavior for infeasible problems, error handling, or edge cases. Without annotations, the burden is higher, but the description provides basic transparency.

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 concise and well-structured in a docstring format with Args and Returns sections. Every sentence adds value, no redundancy.

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?

Given the complexity and lack of output schema or annotations, the description is fairly complete: it details all parameters, algorithm, and return format. Missing edge cases or limitation details, but sufficient for a solver tool.

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?

With 0% schema description coverage, the description compensates by explaining each parameter: workers and tasks are lists, costs is a 2D matrix, and optional constraints are described. This adds significant meaning beyond the schema titles.

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 clearly states the tool solves assignment problems using OR-Tools Hungarian algorithm. It specifies the exact problem type, differentiating it from sibling optimization tools that handle other problems like knapsack or TSP.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly guide when to use this tool vs alternatives. While the purpose is clear, there is no mention of scenarios where this tool is preferable or not, leaving the agent to infer based on the problem name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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