Skip to main content
Glama

tsp_solve

Computes a short round-trip route visiting every given city and returning to the starting point using a nearest-neighbor heuristic.

Instructions

Find a short tour visiting all cities and returning to start (traveling salesman, nearest-neighbor heuristic).

Input Schema

NameRequiredDescriptionDefault
citiesYesArray of {name, x, y} city locations

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden and usefully discloses that the method is a nearest-neighbor heuristic and that the tour returns to the start. It does not state whether the result is guaranteed optimal, how ties are broken, or what the return value looks like.

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?

One compact sentence front-loads the action and objective, then adds the formal problem name and heuristic in parentheses. There is no wasted text.

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

Completeness3/5

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

For a simple one-parameter tool, the description is mostly adequate, but with no output schema it leaves the return format and the approximation guarantee unstated. An agent can infer that a tour is returned, but not whether to expect a full ordered list, distance total, or error behavior.

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 single cities parameter is already well documented structurally. The description adds no parameter-specific meaning beyond implying that all provided cities are visited.

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 short tour) and names the algorithm class (traveling salesman, nearest-neighbor heuristic), so the tool's purpose is unambiguous even among many algorithmic siblings.

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?

Usage is implied by the TSP description and the nearest-neighbor heuristic label, but there is no explicit when-to-use, when-not-to-use, or alternative-tool guidance. The heuristic label hints that results are approximate, yet this is not framed as a selection criterion.

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

Deploy Server

Other Tools