Skip to main content
Glama
Loopback Training Server

Loopback Training Server

update_setback

Close, reopen, or correct a recorded setback to keep an athlete's illness or injury timeline accurate; only the fields you pass change.

Instructions

Change a setback: close it, reopen it, or correct what was recorded. Only what you pass changes.

CLOSING. Set end_date when the athlete says they are recovered. Their word decides it, not the numbers: if the metrics look normal but they still feel off, it stays open, and if they say they are fine while resting heart rate is still raised, close it and say what you see. After closing, the plan still needs a gradual build back (coaching playbook, return to running).

Args: setback_id: The setback's id, from get_plan_context or get_setbacks. end_date: Last day affected, YYYY-MM-DD. Closes the setback. reopen: True to clear the end date, when it came back. severity: "mild", "moderate" or "severe". start_date: Corrected first day, YYYY-MM-DD. kind: "illness" or "injury". body_part: Injuries only. note: Replaces the note. Include what was there if it still holds.

Returns: The setback after the change.

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": {
      "setback_id": "<setback_id>"
    },
    "name": "update_setback"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
noteNo
reopenNo
end_dateNo
severityNo
body_partNo
setback_idYes
start_dateNo

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?

With no annotations provided, the description carries the full burden and does well: it states the partial-update contract ("Only what you pass changes"), warns that `note` is replaced wholesale and must be re-included if still valid, explains that `reopen` clears the end date, and says the return value is the updated setback. It omits error behavior for an unknown `setback_id` and any permission/auth expectations.

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?

The summary line and the partial-update caveat are front-loaded, and the labeled CLOSING block is skimmable. The closing-policy paragraph is the longest part but carries genuine decision rules rather than filler, though it could be tightened without losing meaning.

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 an 8-parameter mutation tool with no annotations and no output schema, the definition covers every field, the update semantics, the return value, and the operational follow-up. Only edge cases (invalid id, conflicting `end_date` plus `reopen`) are left unaddressed.

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%, so the description must compensate, and it does: all 8 parameters get meaning beyond their types, including the source of `setback_id` (get_plan_context or get_setbacks), the YYYY-MM-DD format and closing effect of `end_date`, the enum values for `kind` and `severity`, and the constraint that `body_part` applies to injuries only.

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?

Opens with a specific verb and resource ("Change a setback") and enumerates the three operations it covers: closing, reopening, and correcting recorded fields. That distinguishes it from the log_* siblings, which create rather than modify, so an agent can pick it without opening the schema.

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 unusually concrete when-to guidance for closing (the athlete's stated recovery decides, not the metrics, with both the false-normal and false-bad cases spelled out) and for reopening ("when it came back"). It also flags the downstream step after closing (gradual build back via the coaching playbook). It does not explicitly name an alternative tool for creating a new setback instead of updating one, which keeps it off a 5.

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