Skip to main content
Glama

solve_transportation_problem_tool

Minimize total shipping cost from suppliers to consumers. Provide supply list, demand list, and cost matrix. Returns optimal flows, total cost, and execution time using OR-Tools.

Instructions

    Solve transportation problem using OR-Tools.

    Args:
        suppliers: List of supplier dictionaries with 'name' and 'supply' keys
        consumers: List of consumer dictionaries with 'name' and 'demand' keys
        costs: 2D cost matrix where costs[i][j] is cost of shipping from supplier i to consumer j

    Returns:
        Dictionary with solution status, flows, total cost, and execution time
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
suppliersYes
consumersYes
costsYes
Behavior3/5

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

The description mentions using OR-Tools and specifies the return structure, but without annotations, it does not disclose safety, side effects, or constraints like balanced/unbalanced problems. It provides some behavioral context but is insufficiently transparent.

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?

The description is a well-structured docstring with Args and Returns sections, concise and easy to parse. However, it could be slightly more compact without losing clarity.

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?

The description adequately explains parameters and return values given no output schema. It is complete for basic use but lacks details on handling unbalanced problems or error cases, which are important for a solve 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's expected structure (e.g., suppliers have 'name' and 'supply', costs is a 2D matrix). This adds significant meaning beyond the schema. Slightly docked for not specifying that matrices should align with supplier/consumer order.

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 clearly states it solves a transportation problem using OR-Tools, with a specific verb and resource. However, it does not explicitly differentiate from sibling tools like assignment or linear programming, though the name and context imply distinction.

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?

No guidance is provided on when to use this tool versus alternatives such as solve_assignment_problem_tool or solve_linear_program_tool. The description lacks context for selecting the appropriate optimization tool.

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