Skip to main content
Glama
Loopback Training Server

Loopback Training Server

add_fuel_product

Saves drinks, gels, or other fuel products from athlete-provided label data so they can be selected when logging or planning runs. Check existing entries first to avoid duplicates.

Instructions

Save something the athlete drinks or eats on runs, so it can be picked when logging or planning.

Only on the athlete's say-so, with figures they gave you or read off the label. Do not fill in carbohydrates or caffeine from memory of a brand; leave a figure out when the athlete does not know it. Check get_fuel_products first so nothing is saved twice.

Args: name: What the athlete calls it ("Maurten Gel 100 Caf", "Water"). kind: "drink", "gel" or "other" (chews, a bar, a salt tablet). carbs_g: Carbohydrates in g, per piece, or per serving of a drink. caffeine_mg: Caffeine in mg, per piece, or per serving of a drink. volume_ml: For a drink only: the serving the two figures are for, in ml (500 for a 500 ml bottle).

Returns: The saved product, in the shape get_fuel_products lists.

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": {
      "name": "<name>",
      "kind": "<kind>"
    },
    "name": "add_fuel_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes
nameYes
carbs_gNo
volume_mlNo
caffeine_mgNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does well: it forbids fabricating carbs/caffeine from brand memory, instructs leaving unknown figures out, and requires a dedupe lookup before saving. It also sketches the return value. It stops short of saying what happens when a duplicate or invalid entry is submitted (error vs. merge), which for a write tool with zero annotation coverage is a real gap.

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?

Purpose and the integrity rules are front-loaded, then Args/Returns sections map cleanly to the schema. The Args block largely restates what a reader already inferred from the prose, so there is mild duplication, but nothing is wasted or padded.

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?

With no output schema, the description still tells the agent the return is the saved product in get_fuel_products' shape, and all five parameters are explained. The only missing piece an agent might need is duplicate-handling behavior, which matters because the tool itself instructs a dedupe check first.

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 description coverage is 0%, and the description compensates for every parameter: name with example values, kind with all three enum meanings ('other' explicitly expanded to chews/bar/salt tablet), carbs_g and caffeine_mg with units and per-piece vs. per-serving semantics, and volume_ml restricted to drinks with a concrete 500 ml bottle example.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource: saving a drink/food item the athlete consumes on runs so it can be reused when logging or planning. That distinguishes it from get_fuel_products (read) and log_workout_fuel (consumption logging). The phrase 'so it can be picked when logging' is slightly garbled, which keeps it just short of a 5.

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 constraints: only on the athlete's say-so, with figures the athlete supplied or read off a label. It also names the alternative workflow step ('Check get_fuel_products first so nothing is saved twice'), including the condition that triggers it.

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