Skip to main content
Glama

BRAINIAC Route & Delivery Optimisation

Depot / hub location (p-median)

route-optimization_depot-location-optimize
Read-onlyIdempotent

Choose p hub locations from candidates to minimise demand-weighted distance, optionally capacitated. Price $0.04 USDC. POST /api/v1/route-optimization/depot-location-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": {
      "demand": "<demand>",
      "candidates": "<candidates>",
      "p": "<p>"
    },
    "name": "route-optimization_depot-location-optimize"
  }
}

Input Schema

NameRequiredDescriptionDefault
pYesp, integer, from 1 to 100. Required.
demandYesdemand, array. Required.
matrixNomatrix, object. Optional.
candidatesYescandidates, array. Required.
capacitiesNocapacities, value. Optional.
matrixFromPointsNomatrixFromPoints, string, one of euclidean, haversine. Optional.

Output Schema

NameRequiredDescriptionDefault
methodNomethod. String.
optimalNooptimal. Boolean.
sourcesNosources. Array.
selectedNoselected. Array.
objectiveNoobjective. Number.
allocationNoallocation. Array.
limitationsNolimitations. Array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond them: the $0.04 USDC price and, importantly, that an unpaid call returns x402 payment terms and does not execute the optimization. It stops short of describing result shape or solver limits, but an output schema exists.

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?

Three short sentences, front-loaded with the objective, followed by cost and the payment-gate caveat. The endpoint path is mildly redundant with the tool name but is useful for x402 clients; nothing else is wasted.

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?

For a nested-schema optimization tool with six parameters, annotations and an output schema, the description covers the objective, the capacity variant, pricing and the payment failure mode. The remaining gaps — coordinate-vs-matrix precedence and result contents — are handled by the schema and output schema respectively.

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 heavy lifting is done structurally and a 3 is the baseline. The description adds only marginal meaning — 'p hub locations' clarifies the p parameter's role and 'optionally capacitated' flags the capacities array — without explaining relationships such as matrix versus matrixFromPoints or how demand entries pair with candidates.

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 states a specific verb and resource — 'Choose p hub locations from candidates to minimise demand-weighted distance' — which unambiguously identifies a p-median facility-location problem. It distinguishes the objective from a vehicle-routing or clustering task, though it never names a sibling tool it should be chosen over.

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?

'optionally capacitated' implies when the capacities input matters, but there is no explicit when-to-use or when-not guidance relative to siblings such as vrp-capacitated or territory-cluster. The agent must infer selection criteria from the objective wording alone.

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