Skip to main content
Glama

hungarian_assign

Solve the assignment problem by optimally assigning workers to tasks using the Hungarian algorithm. Provide an NxN cost matrix and optionally set maximize to true.

Instructions

Solve the assignment problem (optimally assign N workers to N tasks) using the Hungarian algorithm.

Input Schema

NameRequiredDescriptionDefault
maximizeNoMaximize instead of minimize (default false)
cost_matrixYesNxN cost matrix

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the algorithm and that results are optimal, which is genuinely useful behavioral context, but it says nothing about the return format, how non-square or infeasible matrices are handled, or that the operation is a pure computation with no side effects.

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?

A single sentence that front-loads the core action and packs the problem definition and algorithm into one line with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter computational tool this is nearly adequate, but with no output schema the description gives no hint of what is returned (assignment pairs, total cost) or the matrix constraints, leaving a real gap for an agent trying to consume the result.

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 description coverage is 100%, so cost_matrix and maximize are already documented in the schema, establishing the baseline of 3. The description adds only the implicit NxN / square-matrix framing (N workers to N tasks), which is marginal additional value.

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?

States a specific verb and resource ('Solve the assignment problem'), names the algorithm, and clarifies the operation with the worker/task phrasing. However, it never differentiates itself from algorithmically adjacent siblings such as tsp_solve or min_cost_max_flow, so it falls short of a 5.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no mention of alternatives even though the sibling list contains several optimization solvers. The agent must infer the selection criteria entirely on its own.

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

Deploy Server

Other Tools