Skip to main content
Glama
Loopback Training Server

Loopback Training Server

log_setback

Records an athlete's illness or injury with start date, severity, and affected body part so future coaching context remembers the setback and can adjust training.

Instructions

Record that the athlete is, or was, ill or injured.

Call this WITHOUT BEING ASKED when the athlete tells you they are sick or hurt, or that they were on days you had no setback for ("I had the flu last weekend", "my calf has been sore since Tuesday's intervals"). This is what makes the next conversation start out knowing it. Check the setbacks in get_plan_context first: if the same one is already open, use update_setback or log_setback_status on it. The server refuses a second open illness, and a second open injury to the same body part.

Ordinary training soreness that fades within two days is not a setback. Tell the athlete you have logged it, in one short sentence.

Args: kind: "illness" (cold, flu, stomach bug, covid) or "injury". start_date: First day affected, YYYY-MM-DD. Ask if it is unclear; it is the anchor every before/after comparison uses. severity: "mild" (could have trained easy), "moderate" (no training) or "severe" (in bed, or cannot walk without pain). Ask rather than guess when the athlete's words do not settle it. end_date: Last day affected, YYYY-MM-DD. Leave out while it is still going on, and while the athlete is "better but not right yet". body_part: Injuries only, in the athlete's words ("left calf"). note: Symptoms and anything that explains it, in a line or two.

Returns: The setback, in the shape get_setbacks 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": {
      "kind": "<kind>",
      "start_date": "<start_date>"
    },
    "name": "log_setback"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes
noteNo
end_dateNo
severityNomoderate
body_partNo
start_dateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does well: it discloses the server-side constraint ('refuses a second open illness, and a second open injury to the same body part') and the required follow-up behavior ('Tell the athlete you have logged it, in one short sentence'). It stops short of describing what happens to an existing open setback's timeline or how a conflict is surfaced as an error, which is the remaining 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?

It is front-loaded with the core instruction and usage trigger before a cleanly separated Args block, so an agent can act on the first paragraph alone. It is on the long side and a few clauses (such as the reassurance about the next conversation) are motivational rather than operational, but nothing is genuinely wasted.

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 six-parameter mutation tool with no annotations and no output schema, the definition covers the trigger, the prerequisite lookup, the conflict rule, each parameter's semantics, and the return shape by reference ('in the shape get_setbacks lists'). An agent has everything needed to call it correctly and report back to the athlete.

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 0%, so the description must compensate entirely, and it does: every one of the six parameters gets meaning beyond its type, including the enum semantics ('mild' = could have trained easy, 'severe' = in bed), the date format (YYYY-MM-DD), and why start_date matters ('the anchor every before/after comparison uses'). It also gives decision rules ('Ask rather than guess') and scoping rules (body_part is injuries only, in the athlete's own words).

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 a specific verb and resource: 'Record that the athlete is, or was, ill or injured.' It then explicitly separates this tool from siblings by directing the agent to update_setback or log_setback_status when a matching setback is already open, so the boundary is unambiguous 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?

Usage is spelled out in both directions: 'Call this WITHOUT BEING ASKED when the athlete tells you they are sick or hurt' plus concrete trigger phrases, and an explicit exclusion ('Ordinary training soreness that fades within two days is not a setback'). It also names the prerequisite check ('Check the `setbacks` in get_plan_context first') and the alternative tools to use when that check fails.

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