Skip to main content
Glama

plan_errands

Order a handful of errands against a hard arrival time, and say honestly whether they fit. This is the "pick up a prescription, get petrol, and be at the school by quarter past three" tool. Give origin, destination (+ destination_name), arrive_by (RFC 3339 with an offset: convert "quarter past three" yourself), optional depart_at, and 1 to 5 errands. Each errand is EITHER a category (a kind of place: "pharmacy", "fuel", "supermarket", or a colloquial phrase the server normalises; use list_place_categories for the vocabulary) OR a place {lat, lon} the driver already knows ("the school", "the nursery"). Resolve a named place with geocode first and pass the coordinate: never invent one. Optional dwell_minutes per errand (default 5). The server chooses the order and the actual shops, exhaustively, over engine-computed travel times -- do NOT attempt the ordering or the arithmetic yourself. IMPORTANT: feasible: false is an ANSWER, not an error to retry. It names the errand that costs the most (blocking_errand), says how late the whole chain would be (over_by_s), and returns the stops of the chain that DOES fit with dropped naming what had to go. Tell the driver what to drop. Every stop is a real indexed place carrying its id: never mention a shop the answer did not return. hours is "open_on_the_tag" (the map's tag covers your arrival, which is evidence and not a promise) or "unknown" (most places carry no hours at all); a place the tag proves shut is never proposed. ALWAYS show usage_note: this is planned before setting off or by a passenger, never at the wheel. Requires the MapMap gateway.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYesWhere the driver sets off from.
errandsYesThe errands, in any order: the answer decides the order. One to five.
arrive_byYesThe hard arrival time, RFC 3339 with an offset ("2026-09-21T15:15:00+01:00"). Convert "quarter past three" to an absolute instant in the driver's own offset before calling.
depart_atNoWhen they set off, RFC 3339. Defaults to now.
destinationYesWhere they have to be by `arrive_by`.
destination_nameNoWhat to call the destination in the answer ("the school").
max_detour_minutesNoHow far off the direct route a candidate place may sit, as a detour in minutes (default 12, at most 45).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stopsYesThe stops, in visit order. On an infeasible answer these are the stops of the reduced plan, the one that DOES fit.
reasonNoThe same cause in plain language, for the driver.
arrivalNoWhen the plan arrives, RFC 3339. Present whenever there is a plan, including the reduced plan on an infeasible answer.
droppedYesErrands that had to be dropped for the plan to fit. Empty when feasible.
slack_sNoSpare seconds before the deadline.
feasibleYes**Whether every errand fits before the deadline.** False is an ANSWER, not an error: report `reason`, the errand named in `blocking_errand`, and what `dropped` says has to go.
arrive_byYesThe deadline, echoed.
departureYesWhen the driver sets off, RFC 3339.
over_by_sNoHow late the whole chain would be, seconds.
usage_noteYes**Always present.** Why this is planned stationary rather than at the wheel. Show it.
attributionNoCredit owed for the place data, when the answer used the index.
reason_codeNoMachine token for why the chain does not fit: "deadline_missed", "destination_unreachable_in_time", "no_candidates_in_corridor", "all_candidates_closed" or "unroutable".
corridor_noteYes**Always present.** What the corridor search did and did not look at. An empty answer is a statement about this index and this corridor, never about what exists on the ground.
failed_errandNoThe errand a "no_candidates_in_corridor" or "all_candidates_closed" answer is about.
total_drive_sNoTotal driving time, seconds.
total_dwell_sNoTotal time out of the car, seconds.
blocking_errandNoThe errand that costs the most time, when the deadline is missed.
verification_noteYes**Always present.** That every stop is an indexed place or a supplied coordinate, never a generated one.
geometry_polyline6NoThe planned journey as an encoded polyline6.
opening_hours_noteYes**Always present.** How opening hours were used, and how little of the map carries them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / $defs / LatLon / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "lat": {
      +        "description": "Latitude in decimal degrees (−90 to 90).",
      +        "format": "double",
      +        "type": "number"
      +      },
      +      "lon": {
      +        "description": "Longitude in decimal degrees (−180 to 180).",
      +        "format": "double",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "lat",
      +      "lon"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "GeoJSON position [lon, lat]: longitude FIRST.",
      +    "items": {
      +      "format": "double",
      +      "type": "number"
      +    },
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / $defs / LatLon / description
      Previous value: -"A WGS84 coordinate pair in decimal degrees."New value: +"A WGS84 coordinate in decimal degrees: a {lat, lon} object (preferred), or a GeoJSON [lon, lat] array with LONGITUDE FIRST, the same order as every polygon field on this server."
    • removedInput schema / $defs / LatLon / properties
      Removed value: -{
      -  "lat": {
      -    "description": "Latitude in decimal degrees (−90 to 90).",
      -    "format": "double",
      -    "type": "number"
      -  },
      -  "lon": {
      -    "description": "Longitude in decimal degrees (−180 to 180).",
      -    "format": "double",
      -    "type": "number"
      -  }
      -}
    • removedInput schema / $defs / LatLon / required
      Removed value: -[
      -  "lat",
      -  "lon"
      -]
    • removedInput schema / $defs / LatLon / type
      Removed value: -"object"
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: feasible:false is an answer not an error, blocking_errand/over_by_s/dropped semantics, hours being evidence not promise, closed places never proposed, stop provenance, usage_note, and gateway requirement. This goes well beyond a generic 'plans errands' statement.

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?

Long but dense and front-loaded with purpose and example, followed by critical call semantics and warnings. No filler; every sentence adds operational or safety guidance.

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

Completeness5/5

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

For a complex 7-parameter tool with no annotations, it covers required inputs, optional inputs, output semantics, failure semantics, safety, and environmental dependency. An output schema exists for return values, so not restating them is appropriate.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds meaning: convert colloquial times to RFC 3339 yourself, resolve named places via geocode before passing coordinates, use list_place_categories, 1-5 errands, dwell default 5. It does not mention max_detour_minutes, but the schema already documents it.

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 the verb+resource precisely: 'Order a handful of errands against a hard arrival time, and say honestly whether they fit.' The example ('pick up a prescription...') and domain-specific framing separate it from sibling routing/planning tools like route, order_stops, or plan_day.

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?

Gives clear operational context: use list_place_categories for vocabulary, geocode named places first, don't do ordering or arithmetic yourself, and never at the wheel. It does not explicitly name sibling alternatives or exclusions, but the when-not ('planned before setting off or by a passenger, never at the wheel') and task-specific framing are clear.

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