mcpserver

package
v0.0.0-...-487d92c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcpserver exposes seaRoute routing as MCP tools: distance_to_go, route and list_passages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(g *route.Graph, ports PortFinder) *mcp.Server

New returns an MCP server with the seaRoute tools. ports may be nil, in which case points must be given as coordinates.

Types

type Passages

type Passages struct {
	Avoid []string `json:"avoid,omitempty" jsonschema:"passages the route must not use, e.g. kiel, suez, oresund; see list_passages"`
	Allow []string `json:"allow,omitempty" jsonschema:"passages closed by default to open, e.g. northeast"`
}

Passages controls which canals and straits a route may use.

type Point

type Point struct {
	Port string   `json:"port,omitempty" jsonschema:"port name; use this or lat and lon"`
	Lat  *float64 `json:"lat,omitempty" jsonschema:"latitude in decimal degrees, north positive"`
	Lon  *float64 `json:"lon,omitempty" jsonschema:"longitude in decimal degrees, east positive"`
}

Point is a position given either by port name or by latitude and longitude.

type PortFinder

type PortFinder func(name string) (route.Position, bool)

PortFinder returns a port's position by exact name.

type Vessel

type Vessel struct {
	DraughtM   *float64 `json:"draught_m,omitempty" jsonschema:"vessel draught in metres, 1 to 25; default 10"`
	SpeedKn    *float64 `json:"speed_kn,omitempty" jsonschema:"speed in knots for squat, 1 to 30; default 14"`
	VesselType string   `json:"vessel_type,omitempty" jsonschema:"tanker, bulk, general or container; default bulk"`
}

Vessel is the ship a route is planned for. Absent fields use the defaults.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL