Skip to main content
Glama

solve_vehicle_routing_problem

Solve the vehicle routing problem to optimize routes for multiple vehicles. Define locations, vehicles, depot, and optional distance or time matrices to find efficient routes under capacity constraints.

Instructions

Solve Vehicle Routing Problem (VRP) to optimize routes for multiple vehicles.

    Args:
        locations: List of location dictionaries with name, coordinates, and demand
        vehicles: List of vehicle dictionaries with capacity constraints
        distance_matrix: Optional pre-calculated distance matrix
        time_matrix: Optional pre-calculated time matrix
        depot: Index of depot location (default: 0)
        time_limit_seconds: Maximum solving time in seconds (default: 30.0)

    Returns:
        Optimization result with routes for all vehicles
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationsYes
vehiclesYes
distance_matrixNo
time_matrixNo
depotNo
time_limit_secondsNo
Behavior2/5

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

No annotations are provided, so the description carries full burden. It fails to disclose behavioral traits such as whether the solver is deterministic, what constraints are enforced, or error handling. The description only states the function purpose without depth.

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 concise and well-structured with a clear docstring format. It front-loads the purpose and lists parameters, but the parameter descriptions are repetitive and could be more compact.

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

Completeness2/5

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

Given the complexity (6 parameters, no output schema, many sibling tools), the description is insufficient. It does not explain return value structure, algorithm behavior, or use cases. A more comprehensive description is needed for effective agent selection.

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?

With 0% schema description coverage, the description adds basic meaning by listing parameter expectations (e.g., locations as dicts with name, coordinates, demand). However, it lacks detail on format constraints, optional matrix usage, or what defaults imply.

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 Vehicle Routing Problems (VRP) to optimize routes for multiple vehicles, with specific arguments listed. This verb+resource pair distinguishes it well from sibling optimization tools like solve_linear_program or solve_traveling_salesman.

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 implies usage for VRP scenarios but does not provide explicit guidance on when to use this tool versus alternatives (e.g., traveling salesman for single vehicle, linear programming for different constraints). No when-not-to-use or prerequisites are mentioned.

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