Skip to main content
Glama
Loopback Training Server

Loopback Training Server

log_workout_fuel

Log what an athlete actually ate and drank during a workout from conversation, including gels, drinks, carbs, caffeine, and distance taken, so fuelling records match what they report.

Instructions

Write down what the athlete drank and ate on a workout, on their say-so.

The athlete can log this in the app themselves; use this when they tell you in conversation instead ("I had two gels and a bottle of water on Sunday's long run"). Log what they say, not what was planned, and ask rather than guess when they are vague about an amount. A drink is ONE entry with the total volume; each gel is its own entry, with at_distance_m when they remember where they took it.

Args: workout_id: UUID of the workout (from get_recent_runs). entries: What to log. Prefer product_id (get_fuel_products) so the figures are the athlete's own. replace: False (default) adds to what is already logged. True replaces the whole log with entries; use it to correct a log, after reading it with get_workout_fuel.

Returns: The workout's fuelling afterwards, in the shape get_workout_fuel 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": {
      "workout_id": "<workout_id>",
      "entries": "<entries>"
    },
    "name": "log_workout_fuel"
  }
}

Input Schema

NameRequiredDescriptionDefault
entriesYes
replaceNo
workout_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and largely meets it: it discloses that this is a write, that replace=False appends while replace=True overwrites the entire log, and that the safe pattern is to read first with get_workout_fuel. It also states the return payload and that product_id-derived figures are filled in (proportionally to volume_ml for drinks), which is real behavioral context rather than a restatement of the signature.

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-loaded with the core action, then a quoted example, then Args/Returns — the structure is easy to scan. A couple of sentences duplicate what the schema already says (drink = one entry, at_distance_m units), so it is slightly longer than strictly necessary.

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?

There is no output schema, but the description explicitly says the return is the workout's fuelling afterwards in get_workout_fuel's shape, which is sufficient. Combined with the entries granularity rules, the product_id fallback behavior, and the replace/correction workflow, nothing an agent needs to call this correctly is missing.

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?

The schema's nested property descriptions are already detailed, and the description adds genuinely new meaning for the two top-level gaps: where workout_id comes from (get_recent_runs), where product_id comes from (get_fuel_products) and why to prefer it, and what replace toggles. It partly repeats schema content (drink as one entry, at_distance_m in meters), which caps this below a 5.

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 first sentence names a specific verb (write down / log) and resource (what the athlete drank and ate on a workout), and immediately distinguishes it from the in-app path and from the read side (get_workout_fuel is referenced for reading the log). An agent can tell this apart from get_workout_fuel and add_fuel_product without opening any schema.

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?

Explicit when-to-use ("use this when they tell you in conversation instead"), explicit alternative (the athlete can log it in the app themselves), and concrete trigger examples in quotes. It also gives operating rules — log what was said not what was planned, ask rather than guess on amounts — and routes the correction case to replace=True after reading with get_workout_fuel.

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