Skip to main content
Glama

Change legs

leg_write
Destructive

Change a trip's ordered legs: create, update, delete, reorder (a full leg-id permutation, reassigning seq 1..N), and fill a leg's wind from a weather service (fetch_weather). A leg backed by a track (statsSource: 'track') rejects an update that touches any computed stats/coordinate/time field with a stats_readonly error — its startName/endName/notes stay editable regardless. The weather fields are hand-entered observations, except the wind pair when weatherSource is 'open_meteo': windSpeedKn is true wind speed in knots, windDirDeg an integer 0-359 in meteorological convention (the direction the wind blows FROM), seaState the Douglas degree of sea 0-9. They stay editable on EVERY leg, track-backed or not, because no GPX file records them. fetch_weather fills the leg's WIND (speed and direction, never sea state) from the free Open-Meteo service: it resolves the position and time window from the leg's own data (its track's middle point, else its endpoint midpoint, else its start) and stores the arithmetic mean of the hourly speeds over that window plus their SPEED-WEIGHTED circular mean direction, stamping weatherSource 'open_meteo' and weatherFetchedAt — except when the window was a dead calm, which yields no direction: a hand-entered windDirDeg then survives and the response says weatherSource 'manual' instead, because the stamp must never attribute a hand-typed value to the provider. This is the ONLY action that makes an outbound network call on the caller's behalf, it is rate-limited to 30 per hour per user, and it overwrites whatever wind the leg already had, hand-entered included. A later hand-edit of either WIND field flips weatherSource back to 'manual' and clears weatherFetchedAt; writing seaState does NOT, because the pair records where the wind came from and sea state is never fetched. A leg with no usable coordinates or no usable time window is weather_no_position (422); an upstream failure or a date the provider does not cover is weather_unavailable (503). IDs are 6-character case-sensitive alphanumeric strings. Timestamps are UTC ISO 8601. Distances are integer meters. Durations are integer seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations supply only destructiveHint=true, so the description carries the rest and does so in depth: track-backed legs reject updates touching computed fields, fetch_weather is the sole outbound network call with a 30/hour/user rate limit, it overwrites existing wind including hand-entered values, and weatherSource flips back to 'manual' on a hand edit but not on seaState. This is far richer than the annotation provides, and nothing contradicts destructiveHint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The action list is correctly front-loaded, but the body is a dense wall of very long sentences with stacked parentheticals (e.g. the speed-weighted circular-mean direction clause), some of which is more implementation detail than an agent needs to invoke the tool. Every fact is relevant, yet the packing hurts scannability.

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 five-action mutation tool with no output schema and no declarative annotations, the description covers side effects, error codes, format conventions, and reorder's full-permutation requirement. It does not explain the expectedUpdatedAt optimistic-concurrency parameter or what each action returns, leaving modest gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuinely non-schema meaning: windDirDeg is an integer 0-359 in meteorological convention (direction FROM), windSpeedKn is true wind speed, seaState is the Douglas degree 0-9, IDs are 6-character case-sensitive alphanumerics, timestamps are UTC ISO 8601, distances integer meters, durations integer seconds. These conventions cannot be inferred from constraints alone.

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?

The opening sentence names the resource (a trip's ordered legs) and enumerates every action verb supported: create, update, delete, reorder, and wind-fill via fetch_weather. The 'Change' framing and the mutation verbs clearly separate it from the sibling leg_read, so an agent can route without opening the schema.

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?

Each action's intended use is spelled out, including the conditions that select fetch_weather versus hand-entry, and the failure modes (weather_no_position 422, weather_unavailable 503, stats_readonly). It stops short of an explicit 'use leg_read to view / use this tool only to mutate' contrast with siblings, but the mutation scope is unambiguous.

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