Skip to main content
Glama
Loopback Training Server

Loopback Training Server

batch_actions

Apply multiple workout edits or deletions in one call to update or remove several scheduled sessions at once instead of repeating individual requests.

Instructions

Create multiple edit/delete actions in a single call.

Use this instead of calling delete_scheduled_workout or edit_scheduled_workout repeatedly when you need to modify or remove multiple workouts at once. Edit compositions support the same goals and per-step alerts as create_workout (incl. heart-rate zones) — see the input schema.

Args: actions: Action objects. For "edit", composition is the full replacement workout (composition.id may be omitted — it is filled from workoutId). For "delete", omit composition.

Example: actions: [ {"workoutId": "aaa-...", "action": "delete"}, {"workoutId": "bbb-...", "action": "edit", "composition": { "displayName": "Updated Run", "activityType": "running", "location": "outdoor", "scheduledDate": "2026-03-25T07:00:00Z", "blocks": [{"iterations": 1, "steps": [{"purpose": "work", "goal": {"type": "time", "value": 1800, "unit": "seconds"}, "alert": {"type": "heartRateZone", "zone": 3}}]}] }} ]

Returns: List of created action objects.

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": {
      "actions": "<actions>"
    },
    "name": "batch_actions"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.2/5.0
Behavior3/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 it does disclose useful mechanics: composition.id may be omitted and is filled from workoutId, composition is required for edit and must be omitted for delete, and the call returns created action objects. However, for a destructive batch operation it says nothing about atomicity (partial failure behavior), whether deletions are recoverable, permission requirements, or batch size limits, which are exactly the traits annotations would normally cover.

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 purpose and routing in the first two sentences, then args, then a worked example — a sensible order with no filler. The Args section mildly restates what the example demonstrates, and the example is long, but it earns its space for such a deeply nested payload.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It covers purpose, routing, edit-vs-delete shapes, and the return type ('List of created action objects'), which is enough to construct a call against a very deep nested schema. What it leaves out for a destructive multi-target tool is failure semantics: whether one bad action aborts the batch, ordering guarantees, and whether deletes are undoable.

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?

Although the single top-level parameter has no schema description, the description adds semantics the schema does not: the edit/delete discriminator contract, that composition is a full replacement (not a patch), and that edit compositions reuse create_workout's goal and alert model including heart-rate zones. The concrete JSON example demonstrates the nested shape end-to-end. It defers deep field-level meaning to the schema ('see the input schema'), which keeps it from 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?

States a specific verb and resource ('Create multiple edit/delete actions in a single call') and immediately scopes it to a batch of workout mutations, which an agent can distinguish from the single-workout siblings named in the next sentence. The 'instead of calling delete_scheduled_workout or edit_scheduled_workout repeatedly' line pins the resource domain without needing 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 Guidelines5/5

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

Explicitly names the two alternative tools and the condition that selects this one over them ('when you need to modify or remove multiple workouts at once'). The word 'repeatedly' implicitly excludes the single-workout case, so an agent has a clear routing rule in both directions.

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