Skip to main content
Glama
Loopback Training Server

Loopback Training Server

set_fuel_plan

Write or replace a planned session's item-by-item fuelling plan so the athlete sees what to drink or eat and when; submit an empty list to remove it.

Instructions

Write the fuelling plan for a planned session. It replaces any plan the session already has; an empty list removes it.

The athlete sees the plan on the session in the app, and after the run next to what they logged, where one tap logs it as planned. So write the plan you would want them to follow, item by item, not a general remark: that belongs in the conversation or the session's description.

BEFORE WRITING ONE: get_fuel_products for what the athlete carries, and get_fuel_history for what they have taken on earlier long runs and how much per hour. Build on that; a plan far above what they are used to is one their stomach has not practised. Say in the conversation what the plan adds up to per hour and why.

One entry per drink with the total to drink over the run (volume_ml), and one entry per gel or other item with where to take it (at_distance_m, METERS). Use product_id wherever the athlete has the product saved.

This is not medical advice, and caffeine and sodium tolerance are personal: where the athlete has not used something before, say so and suggest trying it in training first.

Args: session_id: UUID of the planned session, the queue item's id (from get_plan_workouts, get_pending_workouts or list_queued_workouts). entries: The whole plan.

Returns: The session's plan afterwards, in the shape get_fuel_plan returns.

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": {
      "session_id": "<session_id>",
      "entries": "<entries>"
    },
    "name": "set_fuel_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
entriesYes
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.6/5.0
Behavior4/5

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

No annotations, so the description carries the full burden, and it does a lot: discloses that the write is destructive to any existing plan, that an empty list deletes it, and that the athlete sees the plan in-app and can one-tap log it after the run. It also adds a safety frame (not medical advice, tolerance is personal). It stops short of error/failure behavior, e.g., what happens with an invalid product_id or the 50-entry cap.

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?

Front-loads the core action and replacement semantics, then structures the rest under imperative headers, with a separate Args/Returns block. It is on the long side and the per-hour commentary sentence is a bit tangential, but every paragraph carries usable instruction.

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 high-complexity write tool with no annotations and no output schema, the definition covers entry composition, units, prerequisites, and the return shape by reference. Minor gaps remain around validation, the maxItems limit, and partial-failure behavior.

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?

Adds non-obvious semantics the schema cannot express: one aggregated entry per drink with total volume, one entry per gel/item with at_distance_m, and preferring product_id where the athlete has the product saved. The Args section also explains session_id's provenance with concrete sibling sources (get_plan_workouts, get_pending_workouts, list_queued_workouts).

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 ("Write the fuelling plan for a planned session") and immediately qualifies it with replacement semantics ("It replaces any plan the session already has; an empty list removes it"). This is enough to distinguish it from get_fuel_plan, which is named in the Returns section.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit prerequisite workflow under "BEFORE WRITING ONE" (get_fuel_products, get_fuel_history) and states the reason. It also draws the boundary against a sibling behavior: general remarks "belong in the conversation or the session's description," not here.

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