Skip to main content
Glama

optimize_network

Optimize your annual ocean freight lane portfolio by balancing cost, schedule reliability, and CO2 emissions under budget and service constraints.

Instructions

Optimize a shipper's ENTIRE annual lane PORTFOLIO at once — the question the single-lane tools can't answer. Give a SET of lanes with their annual volumes (an importer's network) and the engine optimizes globally: it procures each lane (contract / spot / optimal mix) and costs it, scores its schedule reliability and its CO2, then enforces NETWORK CONSTRAINTS — a total freight BUDGET (shifts soft-market lanes to locked contracts to fit), a minimum SERVICE level (won't cut a lane's reliability below the floor to save money), and an ESG CO2 ceiling (targets the carbon-heaviest lanes). It surfaces the TOP SAVING lanes (spot-vs-contract spread × volume), where to CONSOLIDATE volume under one alliance contract for a better tier, and the network coste/servicio/CO2 trade-off. Reuses the same modeled engines as the per-lane tools, so the portfolio answer is coherent with each lane. Indicative portfolio guidance, not a tendered rate or committed allocation (regla 7). PREMIUM: x402 (USDC on Base) or a prepaid key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lanesYesThe lane portfolio. Each item: { origin_port, dest_port, annual_volume, container_type?, contract_rate_offered? }. REQUIRED, max 30.
ship_dateNoReference ship date (ISO) for the seasonal/market context. Optional.
risk_toleranceNo'low', 'medium' (default) or 'high' — the portfolio's appetite for spot exposure.
budgetNoTotal annual freight budget (USD). If exceeded, the engine recommends shifting lanes toward locked contracts. Optional.
min_reliabilityNoMinimum acceptable schedule reliability (0-100) on any lane. Lanes below it are flagged; cost is not cut at the expense of service. Optional.
max_co2_tonnesNoNetwork CO2 ceiling (tonnes/yr). If exceeded, the engine targets the carbon-heaviest lanes. Optional.
consolidation_thresholdNoVolume (containers/yr) at which a lane earns a consolidated-contract tier. Optional; default 500.
Behavior5/5

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

No annotations provided, so description carries full burden. Describes global optimization process, network constraints (budget, service, CO2), outputs (top saving lanes, consolidation, trade-offs), and indicative nature. Also discloses premium cost. Very 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?

Dense paragraph but front-loads purpose and contrast with single-lane tools. Every sentence adds value. Could use bullet points for constraints, but overall efficient for the complexity.

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?

Covers what the tool does, how it works, constraints, and outputs (top saving lanes, consolidation, trade-offs). Missing explicit output format, but no output schema exists; description gives adequate high-level picture for a complex 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?

Schema coverage 100%, baseline 3. Description adds context: explains lanes as a portfolio, budget shifts lanes to contracts, min_reliability prevents cutting service, max_co2 targets carbon lanes, consolidation_threshold triggers tier. Adds significant meaning beyond schema.

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?

Clearly states it optimizes an entire annual lane portfolio, contrasting with single-lane tools. Uses specific verb+resource: 'Optimize a shipper's ENTIRE annual lane PORTFOLIO at once'. Distinguishes from siblings like get_lane_trend, get_spot_rate.

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

Usage Guidelines4/5

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

Explains this tool is for portfolio-level optimization, not single lanes. Mentions it reuses same engines for coherence. Implicitly suggests when to use (when you have a set of lanes with volumes), but lacks explicit when-not-to-use or alternative tool names.

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/Baneado98/freight-pulse'

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