Skip to main content
Glama

BRAINIAC Route & Delivery Optimisation

Travelling salesman route order

route-optimization_tsp-optimize
Read-onlyIdempotent

Find a best visiting order for one vehicle (closed tour or open path) with fixed start and optional fixed end using Held-Karp or local search. Price $0.05 USDC. POST /api/v1/route-optimization/tsp-optimize. An unpaid call returns the x402 payment terms and does not run.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "locations": "<locations>",
      "start": "<start>"
    },
    "name": "route-optimization_tsp-optimize"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoend, value. Optional.
speedNospeed, number. Optional.
startYesid, string, length 1 to 120. Required.
matrixNomatrix, object. Optional.
circuityNocircuity, number, from 1 to 3. Optional.
speedMpsNospeedMps, number. Optional.
locationsYeslocations, array. Required.
objectiveNoobjective, string, one of distance, duration. Optional.
timeLimitMsNotimeLimitMs, integer, from 1 to 25000. Optional.
matrixFromPointsNomatrixFromPoints, string, one of euclidean, haversine. Optional.

Output Schema

NameRequiredDescriptionDefault
methodNomethod. String.
optimalNooptimal. Boolean.
sourcesNosources. Array.
estimateNoestimate. Boolean.
sequenceNosequence. Array.
limitationsNolimitations. Array.
timeLimitMsNotimeLimitMs. Number.
totalDistanceNototalDistance. Number.
totalDurationNototalDuration. Number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered. The description adds behavior the annotations do not: a $0.05 USDC price, the exact POST endpoint, and the crucial fact that an unpaid call returns x402 payment terms without executing. Solver tuning behavior (what the two algorithms trade off) is the one omission.

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?

Three short sentences: capability first, then price/endpoint, then the unpaid-call caveat. Nothing is repeated from the schema and every sentence carries information an agent needs before calling.

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?

An output schema exists, so return values need no explanation, and the payment gate is disclosed. What remains thin is the cost/latency tradeoff between Held-Karp and local search and how timeLimitMs interacts with it, which matters for a 10-parameter solver with nested matrix input.

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 the schema already documents all ten parameters. The description adds only the semantic that 'start' is fixed and 'end' is an optional fixed endpoint, without explaining matrix/matrixFromPoints precedence, objective choice, or how timeLimitMs affects method selection — a baseline 3.

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?

States a specific verb and resource ('find a best visiting order for one vehicle'), the two output shapes (closed tour vs open path), the start/end constraints, and the solving methods (Held-Karp or local search). The 'one vehicle' scoping cleanly separates it from the fleet-oriented siblings like vrp-capacitated and vrp-time-windows.

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 single-vehicle, fixed-start framing implicitly tells an agent when this applies, and no exclusions are needed for a read-only solver. However, it never names a sibling as the alternative for multi-vehicle, capacity, or time-window cases, so the routing decision is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources